summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-09-24 13:56:39 +0000
committerpeter1138 <peter1138@openttd.org>2005-09-24 13:56:39 +0000
commit5dcb1e34fd90dc9a39e638db61165c7163a41db2 (patch)
tree9c3c0f779426eef44c578e5eff9fd77c8efb5830 /train_cmd.c
parent73d3667dc3aadfaa9061b47b46e653ee3fab13d6 (diff)
downloadopenttd-5dcb1e34fd90dc9a39e638db61165c7163a41db2.tar.xz
(svn r2982) Newgrf: Added patch option for wagon speed limits. This is enabled by default.
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 3fad0435a..e5b3f2b1b 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -113,8 +113,9 @@ void TrainConsistChanged(Vehicle *v) {
}
// max speed is the minimum of the speed limits of all vehicles in the consist
- if (rvi_u->max_speed != 0 && !UsesWagonOverride(u))
- max_speed = min(rvi_u->max_speed, max_speed);
+ if (!(rvi_u->flags & RVI_WAGON) || _patches.wagon_speed_limits)
+ if (rvi_u->max_speed != 0 && !UsesWagonOverride(u))
+ max_speed = min(rvi_u->max_speed, max_speed);
// check the vehicle length (callback)
veh_len = CALLBACK_FAILED;