diff options
author | rubidium <rubidium@openttd.org> | 2010-08-18 18:57:58 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-18 18:57:58 +0000 |
commit | 04d6648c5efd89a32669a17d6ad2711c719820d9 (patch) | |
tree | 358fd69107d22958bfadcb0d53f2f7e3a9f69b65 | |
parent | 019878118d11a6596eeab608c361dfea06c3f1ff (diff) | |
download | openttd-04d6648c5efd89a32669a17d6ad2711c719820d9.tar.xz |
(svn r20546) -Fix (r20542): starting AIs shouldn't cause an assertion to trigger
-rw-r--r-- | src/command.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command.cpp b/src/command.cpp index a931cca03..273bdd0a6 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -501,7 +501,8 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac int y = TileY(tile) * TILE_SIZE; #ifdef ENABLE_NETWORK - if (only_sending && GetCommandFlags(cmd) & CMD_CLIENT_ID) p2 = CLIENT_ID_SERVER; + /* Only set p2 when the command does not come from the network. */ + if (!(cmd & CMD_NETWORK_COMMAND) && GetCommandFlags(cmd) & CMD_CLIENT_ID) p2 = CLIENT_ID_SERVER; #endif CommandCost res = DoCommandPInternal(tile, p1, p2, cmd, callback, text, my_cmd, estimate_only); |