summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-12-18 22:48:45 +0000
committerDarkvater <Darkvater@openttd.org>2005-12-18 22:48:45 +0000
commitabc7e5e6590d9d125479b695d4106495783b6419 (patch)
treedf0dbe87387d10f52521c681f7e2089d9b433c6e /command.c
parentb6d5ebc6294a5c6d853cbb92284d4d08d726681c (diff)
downloadopenttd-abc7e5e6590d9d125479b695d4106495783b6419.tar.xz
(svn r3319) - Fix (regression): "Unnamed Competitors". A result of revision r3224 which allowed AI's for multiplayer. Old AI's didn't function correctly anymore. The update of last-built tile is moved back, but to a slightly different place so it is only executed when the command is actually successfully executed. This code shouldn't be neccessary, but alas, the old AI doesn't use DoCommandDP() functions.
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index 1c92b6895..924188e07 100644
--- a/command.c
+++ b/command.c
@@ -377,6 +377,10 @@ error:
// if toplevel, subtract the money.
if (--_docommand_recursive == 0) {
SubtractMoneyFromPlayer(res);
+ // XXX - Old AI hack which doesn't use DoCommandDP; update last build coord of player
+ if ( (x|y) != 0 && _current_player < MAX_PLAYERS) {
+ GetPlayer(_current_player)->last_build_coordinate = TileVirtXY(x, y);
+ }
}
_cmd_text = NULL;