Mercurial > hg > openttd
changeset 4172:a45f5f08cd11 draft
(svn r5610) Remove a pointless call to VehicleInTheWayErrMsg() - only trains can be on rail bridges
author | tron <tron@openttd.org> |
---|---|
date | Wed, 26 Jul 2006 05:57:30 +0000 |
parents | 99326b5a6994 |
children | ee1185ffaa28 |
files | tunnelbridge_cmd.c |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -792,20 +792,16 @@ } 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); }