From ce513b46b7d69e2ff53982341b214da07c9a8a1e Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 21 Mar 2009 22:32:51 +0000 Subject: (svn r15793) -Feature: Allow train vehicles to be shorten to 1/8 length, even if not at the end of the train. --- src/train_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-54-g00ecf