summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-03-21 22:32:51 +0000
committerfrosch <frosch@openttd.org>2009-03-21 22:32:51 +0000
commitce513b46b7d69e2ff53982341b214da07c9a8a1e (patch)
tree303df5265c1cd4f7b730947a22ae1011a2b33a33
parent88a95661a31641d222d64658293a5286fef774a8 (diff)
downloadopenttd-ce513b46b7d69e2ff53982341b214da07c9a8a1e.tar.xz
(svn r15793) -Feature: Allow train vehicles to be shorten to 1/8 length, even if not at the end of the train.
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index e52a04eb0..579291f7b 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -324,7 +324,7 @@ void TrainConsistChanged(Vehicle *v, bool same_length)
veh_len = GetVehicleCallback(CBID_VEHICLE_LENGTH, 0, 0, u->engine_type, u);
}
if (veh_len == CALLBACK_FAILED) veh_len = rvi_u->shorten_factor;
- veh_len = 8 - Clamp(veh_len, 0, u->Next() == NULL ? 7 : 5); // the clamp on vehicles not the last in chain is stricter, as too short wagons can break the 'follow next vehicle' code
+ veh_len = 8 - Clamp(veh_len, 0, 7);
/* verify length hasn't changed */
if (same_length && veh_len != u->u.rail.cached_veh_length) RailVehicleLengthChanged(u);