(svn r21136) -Fix [FS#4213]: bridge speed limits should apply to all wagons of a vehicle, not just the head of the vehicle

This commit is contained in:
rubidium
2010-11-10 20:15:48 +00:00
parent b8cb654adc
commit d1dfb27699
3 changed files with 7 additions and 6 deletions

View File

@@ -3296,8 +3296,8 @@ static void TrainController(Train *v, Vehicle *nomove)
* - for tunnels, only the part when the vehicle is not visible (part of enter/exit tile too)
* - for bridges, only the middle part - without the bridge heads */
if (!(v->vehstatus & VS_HIDDEN)) {
v->cur_speed =
min(v->cur_speed, GetBridgeSpec(GetBridgeType(v->tile))->speed);
Train *first = v->First();
first->cur_speed = min(first->cur_speed, GetBridgeSpec(GetBridgeType(v->tile))->speed);
}
if (IsTileType(gp.new_tile, MP_TUNNELBRIDGE) && HasBit(VehicleEnterTile(v, gp.new_tile, gp.x, gp.y), VETS_ENTERED_WORMHOLE)) {