diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -605,7 +605,7 @@ static CommandCost DoClearTunnel(TileInd endtile = GetOtherTunnelEnd(tile); - if (GetVehicleTunnelBridge(tile, endtile) != NULL) return CMD_ERROR; + if (HasVehicleOnTunnelBridge(tile, endtile)) return CMD_ERROR; _build_tunnel_endtile = endtile; @@ -670,7 +670,7 @@ static CommandCost DoClearBridge(TileInd endtile = GetOtherBridgeEnd(tile); - if (GetVehicleTunnelBridge(tile, endtile) != NULL) return CMD_ERROR; + if (HasVehicleOnTunnelBridge(tile, endtile)) return CMD_ERROR; direction = GetTunnelBridgeDirection(tile); delta = TileOffsByDiagDir(direction);