summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp8
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;
}