diff options
author | bjarni <bjarni@openttd.org> | 2005-01-30 13:03:32 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2005-01-30 13:03:32 +0000 |
commit | 5987455d359375ab574dd0accc6a1871602c87ae (patch) | |
tree | f4389cf976643959c60cee2389c87e647cddcfd5 /train_cmd.c | |
parent | cc7f7220c0f098da69be630a33bad75b6505788b (diff) | |
download | openttd-5987455d359375ab574dd0accc6a1871602c87ae.tar.xz |
(svn r1727) - Fix: now CmdBuildRailVehicle() behaves correctly if DC_EXEC is set
this commit alters ai.c a little to get rid of the workaround from r1725 so AI players could still build locomotives
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/train_cmd.c b/train_cmd.c index 2ab61e49e..bc9ef02b8 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -528,11 +528,9 @@ int32 CmdBuildRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (!IsEngineBuildable(p1, VEH_Train)) return CMD_ERROR; - /* NOTE: The AI sends build engine commands without DC_EXEC to figure out if - it can affort an engine before trying to buy it*/ - if (!IsTrainDepotTile((TileIndex)tile) && flags & DC_EXEC) return CMD_ERROR; + if (!IsTrainDepotTile((TileIndex)tile)) return CMD_ERROR; - if (_map_owner[tile] != _current_player && flags & DC_EXEC) return CMD_ERROR; + if (_map_owner[tile] != _current_player) return CMD_ERROR; _cmd_build_rail_veh_var1 = 0; |