diff options
author | pasky <pasky@openttd.org> | 2005-03-06 16:58:42 +0000 |
---|---|---|
committer | pasky <pasky@openttd.org> | 2005-03-06 16:58:42 +0000 |
commit | a0c157eea846ad7ee938efcd7d471660b31c120f (patch) | |
tree | c8f1ccfcf0da0b87bbe86b9899005f1257497f27 /train_cmd.c | |
parent | 4a6a7028a906e5affd50aceaa3a1992b3bbb308b (diff) | |
download | openttd-a0c157eea846ad7ee938efcd7d471660b31c120f.tar.xz |
(svn r1947) As in r1946, permit DC_QUERY_COST even on non-depot tiles - so that it works for the ai_new. It is de iure not a bug yet but let's be safe against future annoying headaches. Signed-Off-By: TrueLight
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/train_cmd.c b/train_cmd.c index 2947f6fbc..5aa0ed2bc 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -542,9 +542,10 @@ int32 CmdBuildRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (!IsEngineBuildable(p1, VEH_Train)) return CMD_ERROR; - if (!IsTileDepotType(tile, TRANSPORT_RAIL)) return CMD_ERROR; - - if (_map_owner[tile] != _current_player) return CMD_ERROR; + if (!(flags & DC_QUERY_COST)) { + if (!IsTileDepotType(tile, TRANSPORT_RAIL)) return CMD_ERROR; + if (_map_owner[tile] != _current_player) return CMD_ERROR; + } _cmd_build_rail_veh_var1 = 0; |