# HG changeset patch # User tron # Date 1150278770 0 # Node ID 641c137f4c2d66a9383aca161e3e80eef7055004 # Parent 10b32af73bd0ce9dba9f812c7ff0b53a89bfcd1d (svn r5260) -Fix: It was possible to convert the railtype of a bridge while a train was on it diff -r 10b32af73bd0 -r 641c137f4c2d tunnelbridge_cmd.c --- a/tunnelbridge_cmd.c Wed Jun 14 09:01:21 2006 +0000 +++ b/tunnelbridge_cmd.c Wed Jun 14 09:52:50 2006 +0000 @@ -788,7 +788,6 @@ } return _price.build_rail >> 1; } else if (IsBridge(tile) && IsBridgeRamp(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) { - uint z = TilePixelHeight(tile) + TILE_HEIGHT; const Vehicle* v; TileIndexDiff delta; int32 cost; @@ -797,7 +796,7 @@ endtile = GetOtherBridgeEnd(tile); // Make sure there's no vehicle on the bridge - v = FindVehicleBetween(tile, endtile, z); + v = FindVehicleBetween(tile, endtile, GetBridgeHeightRamp(tile)); if (v != NULL) { return_cmd_error(VehicleInTheWayErrMsg(v)); }