summaryrefslogtreecommitdiff
path: root/src/ai/ai.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-21 21:50:46 +0000
committerrubidium <rubidium@openttd.org>2007-12-21 21:50:46 +0000
commit9e9cfe6e59de14f7df9ab505f9bf5ef3d827545d (patch)
treed864de233dd5965735564d85017cf7abf0875933 /src/ai/ai.cpp
parent65754b8d12099be586967a4bba5b82a484628b18 (diff)
downloadopenttd-9e9cfe6e59de14f7df9ab505f9bf5ef3d827545d.tar.xz
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
Diffstat (limited to 'src/ai/ai.cpp')
-rw-r--r--src/ai/ai.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp
index 1f85fc981..3a4a435a1 100644
--- a/src/ai/ai.cpp
+++ b/src/ai/ai.cpp
@@ -3,7 +3,7 @@
#include "../stdafx.h"
#include "../openttd.h"
#include "../variables.h"
-#include "../command.h"
+#include "../command_func.h"
#include "../network/network.h"
#include "../helpers.hpp"
#include "ai.h"
@@ -45,7 +45,7 @@ static void AI_DequeueCommands(PlayerID player)
* Needed for SP; we need to delay DoCommand with 1 tick, because else events
* will make infinite loops (AIScript).
*/
-static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCallback* callback)
+static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uint32 p2, uint32 procc, CommandCallback* callback)
{
AICommand *com;
@@ -81,7 +81,7 @@ static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uin
/**
* Executes a raw DoCommand for the AI.
*/
-CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc, CommandCallback* callback)
+CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint32 procc, CommandCallback* callback)
{
PlayerID old_lp;
CommandCost res;
@@ -104,10 +104,6 @@ CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, u
/* Restore _cmd_text */
_cmd_text = tmp_cmdtext;
- /* If we did a DC_EXEC, and the command did not return an error, execute it
- * over the network */
- if (flags & DC_NO_WATER) procc |= CMD_NO_WATER;
-
/* NetworkSend_Command needs _local_player to be set correctly, so
* adjust it, and put it back right after the function */
old_lp = _local_player;
@@ -134,7 +130,7 @@ CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, u
}
-CommandCost AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc)
+CommandCost AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint32 procc)
{
return AI_DoCommandCc(tile, p1, p2, flags, procc, NULL);
}