(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

@@ -669,7 +669,8 @@ static int RoadVehAccelerate(RoadVehicle *v)
/* Apply bridge speed limit */
if (v->state == RVSB_WORMHOLE && !(v->vehstatus & VS_HIDDEN)) {
v->cur_speed = min(v->cur_speed, GetBridgeSpec(GetBridgeType(v->tile))->speed * 2);
RoadVehicle *first = v->First();
first->cur_speed = min(first->cur_speed, GetBridgeSpec(GetBridgeType(v->tile))->speed * 2);
}
/* Update statusbar only if speed has changed to save CPU time */