summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-10 20:15:48 +0000
committerrubidium <rubidium@openttd.org>2010-11-10 20:15:48 +0000
commitd1dfb276992e309d54c55a07ef79aa600a38b8f4 (patch)
tree50f75235cc7d4f293b0b0dc04c8613bad95e33b2 /src/roadveh_cmd.cpp
parentb8cb654adcc280303b6e442b7c476968996efa88 (diff)
downloadopenttd-d1dfb276992e309d54c55a07ef79aa600a38b8f4.tar.xz
(svn r21136) -Fix [FS#4213]: bridge speed limits should apply to all wagons of a vehicle, not just the head of the vehicle
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 188deb876..5fa694909 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -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 */