mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r4766) -Fix: Vehicles on a sloped tile under a bridge were affected by the bridge speed limit
This commit is contained in:
parent
5622ad4b5e
commit
24854be59e
@ -1357,10 +1357,7 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y
|
||||
}
|
||||
} else if (IsBridge(tile)) { // XXX is this necessary?
|
||||
if (v->type == VEH_Road || (v->type == VEH_Train && IsFrontEngine(v))) {
|
||||
uint h = GetTileMaxZ(tile);
|
||||
|
||||
if (IsBridgeRamp(tile) ||
|
||||
myabs(h - v->z_pos) > 2) { // high above the ground -> on the bridge
|
||||
if (IsBridgeRamp(tile) || v->z_pos > GetTileMaxZ(tile)) {
|
||||
/* modify speed of vehicle */
|
||||
uint16 spd = _bridge[GetBridgeType(tile)].speed;
|
||||
if (v->type == VEH_Road) spd *= 2;
|
||||
|
Loading…
Reference in New Issue
Block a user