diff options
author | belugas <belugas@openttd.org> | 2007-04-01 11:11:49 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-04-01 11:11:49 +0000 |
commit | 65bc46082ec6685c4fbd585eb9894fb8e77c8ace (patch) | |
tree | 6a3e8c166a44b7315ad8a3112b2dae03664970f2 /src/tunnelbridge_cmd.cpp | |
parent | 191ea4b1ba60124222c09642f7909edb63d2f076 (diff) | |
download | openttd-65bc46082ec6685c4fbd585eb9894fb8e77c8ace.tar.xz |
(svn r9542) -Fix(FS# 712): When checking if a vehicle is on a given tile, and you are working on the ground tile, do not take aircrafts into account, as they do not pose any danger for the construction/destruction/conversion itself. Z stuff, in other words
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index e386da262..777e869ac 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -637,8 +637,8 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags) endtile = GetOtherBridgeEnd(tile); - if (!EnsureNoVehicle(tile) || - !EnsureNoVehicle(endtile) || + if (!EnsureNoVehicleOnGround(tile) || + !EnsureNoVehicleOnGround(endtile) || IsVehicleOnBridge(tile, endtile, GetBridgeHeight(tile))) { return CMD_ERROR; } @@ -741,8 +741,8 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec) endtile = GetOtherBridgeEnd(tile); - if (!EnsureNoVehicle(tile) || - !EnsureNoVehicle(endtile) || + if (!EnsureNoVehicleOnGround(tile) || + !EnsureNoVehicleOnGround(endtile) || IsVehicleOnBridge(tile, endtile, GetBridgeHeight(tile))) { return CMD_ERROR; } |