summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp12
-rw-r--r--src/saveload/vehicle_sl.cpp1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index e4069b1bb..d2b886c6d 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2072,6 +2072,18 @@ bool AfterLoadGame()
st->airport.h = st->GetAirportSpec()->size_y;
}
}
+
+ Train *t;
+ FOR_ALL_TRAINS(t) {
+ /* Copy old GOINGUP / GOINGDOWN flags. */
+ if (HasBit(t->flags, 1)) {
+ ClrBit(t->flags, 1);
+ SetBit(t->gv_flags, GVF_GOINGUP_BIT);
+ } else if (HasBit(t->flags, 2)) {
+ ClrBit(t->flags, 2);
+ SetBit(t->gv_flags, GVF_GOINGDOWN_BIT);
+ }
+ }
}
/* Road stops is 'only' updating some caches */
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index 70ce2e1f3..15782f524 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -544,6 +544,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_CONDVAR(Train, wait_counter, SLE_UINT16, 136, SL_MAX_VERSION),
SLE_CONDNULL(2, 2, 19),
+ SLE_CONDVAR(Train, gv_flags, SLE_UINT16, 139, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 11 bytes) */
SLE_CONDNULL(11, 2, SL_MAX_VERSION),