summaryrefslogtreecommitdiff
path: root/ai
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-12-08 21:12:15 +0000
committerbjarni <bjarni@openttd.org>2005-12-08 21:12:15 +0000
commite486e56050fe0366ca2538be0b268710b75ba7f4 (patch)
treea2bbf06958fda6e7e7c3b1afc6ae06303f8584c1 /ai
parentc50ef5bc07c5fc4ec848debedbb50103a2a8093c (diff)
downloadopenttd-e486e56050fe0366ca2538be0b268710b75ba7f4.tar.xz
(svn r3272) -Fix: [AI] fixed issue in AI that prevented compilation without network support
Diffstat (limited to 'ai')
-rw-r--r--ai/ai.c2
-rw-r--r--ai/ai.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/ai/ai.c b/ai/ai.c
index 60cb8c785..96f2ec9e1 100644
--- a/ai/ai.c
+++ b/ai/ai.c
@@ -114,11 +114,13 @@ int32 AI_DoCommand(uint tile, uint32 p1, uint32 p2, uint32 flags, uint procc)
old_lp = _local_player;
_local_player = _current_player;
+#ifdef ENABLE_NETWORK
/* Send the command */
if (_networking)
/* Network is easy, send it to his handler */
NetworkSend_Command(tile, p1, p2, procc, NULL);
else
+#endif
/* If we execute BuildCommands directly in SP, we have a big problem with events
* so we need to delay is for 1 tick */
AI_PutCommandInQueue(_current_player, tile, p1, p2, procc);
diff --git a/ai/ai.h b/ai/ai.h
index c68eb40b4..fcbd7eefb 100644
--- a/ai/ai.h
+++ b/ai/ai.h
@@ -3,6 +3,7 @@
#include "../functions.h"
#include "../network.h"
+#include "../player.h"
#ifdef GPMI
#include <gpmi.h>
#endif /* GPMI */