From b8d6986d8fc6bccd41102c01f3b11410d6c4ce88 Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 26 Jul 2006 05:57:30 +0000 Subject: [PATCH] (svn r5610) Remove a pointless call to VehicleInTheWayErrMsg() - only trains can be on rail bridges --- tunnelbridge_cmd.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 8d7bc92fcc..ead5e9722e 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -792,20 +792,16 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec) } return _price.build_rail >> 1; } else if (IsBridge(tile) && IsBridgeRamp(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) { - const Vehicle* v; TileIndexDiff delta; int32 cost; if (!CheckTileOwnership(tile)) return CMD_ERROR; 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); }