summaryrefslogtreecommitdiff
path: root/src/saveload/vehicle_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/vehicle_sl.cpp')
-rw-r--r--src/saveload/vehicle_sl.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index 398f74e2f..f85719e38 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -308,6 +308,23 @@ void AfterLoadVehicles(bool part_of_load)
}
}
+ if (IsSavegameVersionBefore(157)) {
+ /* The road vehicle subtype was converted to a flag. */
+ RoadVehicle *rv;
+ FOR_ALL_ROADVEHICLES(rv) {
+ if (rv->subtype == 0) {
+ /* The road vehicle is at the front. */
+ rv->SetFrontEngine();
+ } else if (rv->subtype == 1) {
+ /* The road vehicle is an articulated part. */
+ rv->subtype = 0;
+ rv->SetArticulatedPart();
+ } else {
+ NOT_REACHED();
+ }
+ }
+ }
+
CheckValidVehicles();
FOR_ALL_VEHICLES(v) {