summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/saveload/vehicle_sl.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index b51c17655..bdebec8a0 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -274,8 +274,15 @@ void AfterLoadVehicles(bool part_of_load)
}
/* Stop non-front engines */
- FOR_ALL_VEHICLES(v) {
- if (v->type == VEH_TRAIN && IsTrainEngine(v) && !IsFrontEngine(v)) v->vehstatus |= VS_STOPPED;
+ if (CheckSavegameVersion(112)) {
+ FOR_ALL_VEHICLES(v) {
+ if (v->type == VEH_TRAIN && !IsFrontEngine(v)) {
+ if (IsTrainEngine(v)) v->vehstatus |= VS_STOPPED;
+ /* cur_speed is now relevant for non-front parts - nonzero breaks
+ * moving-wagons-inside-depot- and autoreplace- code */
+ v->cur_speed = 0;
+ }
+ }
}
FOR_ALL_VEHICLES(v) {