(svn r5610) Remove a pointless call to VehicleInTheWayErrMsg() - only trains can be on rail bridges

pull/155/head
tron 18 years ago
parent 40a8964911
commit b8d6986d8f

@ -792,20 +792,16 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
} }
return _price.build_rail >> 1; return _price.build_rail >> 1;
} else if (IsBridge(tile) && IsBridgeRamp(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) { } else if (IsBridge(tile) && IsBridgeRamp(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) {
const Vehicle* v;
TileIndexDiff delta; TileIndexDiff delta;
int32 cost; int32 cost;
if (!CheckTileOwnership(tile)) return CMD_ERROR; if (!CheckTileOwnership(tile)) return CMD_ERROR;
endtile = GetOtherBridgeEnd(tile); endtile = GetOtherBridgeEnd(tile);
// Make sure there's no vehicle on the bridge
v = FindVehicleBetween(tile, endtile, GetBridgeHeightRamp(tile));
if (v != NULL) {
return_cmd_error(VehicleInTheWayErrMsg(v));
}
if (!EnsureNoVehicle(tile) || !EnsureNoVehicle(endtile)) { if (!EnsureNoVehicle(tile) ||
!EnsureNoVehicle(endtile) ||
FindVehicleBetween(tile, endtile, GetBridgeHeightRamp(tile)) != NULL) {
return_cmd_error(STR_8803_TRAIN_IN_THE_WAY); return_cmd_error(STR_8803_TRAIN_IN_THE_WAY);
} }

Loading…
Cancel
Save