Changeset - r3774:3a989fb0c120
[Not reviewed]
master
0 1 0
tron - 18 years ago 2006-05-07 08:18:12
tron@openttd.org
(svn r4766) -Fix: Vehicles on a sloped tile under a bridge were affected by the bridge speed limit
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
tunnelbridge_cmd.c
Show inline comments
 
@@ -1357,10 +1357,7 @@ static uint32 VehicleEnter_TunnelBridge(
 
		}
 
	} 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;
0 comments (0 inline, 0 general)