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/oldloader_sl.cpp2
-rw-r--r--src/saveload/station_sl.cpp8
3 files changed, 17 insertions, 5 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index dfb379c11..f918e9972 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -525,7 +525,7 @@ bool AfterLoadGame()
/* no station is determined by 'tile == INVALID_TILE' now (instead of '0') */
Station *st;
FOR_ALL_STATIONS(st) {
- if (st->airport_tile == 0) st->airport_tile = INVALID_TILE;
+ if (st->airport.tile == 0) st->airport.tile = INVALID_TILE;
if (st->dock_tile == 0) st->dock_tile = INVALID_TILE;
if (st->train_station.tile == 0) st->train_station.tile = INVALID_TILE;
}
@@ -2063,6 +2063,16 @@ bool AfterLoadGame()
}
}
+ if (CheckSavegameVersion(139)) {
+ Station *st;
+ FOR_ALL_STATIONS(st) {
+ if (st->airport.tile != INVALID_TILE) {
+ st->airport.w = st->GetAirportSpec()->size_x;
+ st->airport.h = st->GetAirportSpec()->size_y;
+ }
+ }
+ }
+
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index d21a3975c..d358fc35e 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -712,7 +712,7 @@ static const OldChunks station_chunk[] = {
OCL_NULL( 4 ), ///< bus/lorry tile
OCL_SVAR( OC_TILE, Station, train_station.tile ),
- OCL_SVAR( OC_TILE, Station, airport_tile ),
+ OCL_SVAR( OC_TILE, Station, airport.tile ),
OCL_SVAR( OC_TILE, Station, dock_tile ),
OCL_SVAR( OC_UINT8, Station, train_station.w ),
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp
index 99161ae1c..72f107eb8 100644
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -151,8 +151,10 @@ static const SaveLoad _old_station_desc[] = {
SLE_CONDNULL(4, 0, 5), ///< bus/lorry tile
SLE_CONDVAR(Station, train_station.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5),
SLE_CONDVAR(Station, train_station.tile, SLE_UINT32, 6, SL_MAX_VERSION),
- SLE_CONDVAR(Station, airport_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5),
- SLE_CONDVAR(Station, airport_tile, SLE_UINT32, 6, SL_MAX_VERSION),
+ SLE_CONDVAR(Station, airport.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5),
+ SLE_CONDVAR(Station, airport.tile, SLE_UINT32, 6, SL_MAX_VERSION),
+ SLE_CONDVAR(Station, airport.w, SLE_UINT8, 139, SL_MAX_VERSION),
+ SLE_CONDVAR(Station, airport.h, SLE_UINT8, 139, SL_MAX_VERSION),
SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5),
SLE_CONDVAR(Station, dock_tile, SLE_UINT32, 6, SL_MAX_VERSION),
SLE_REF(Station, town, REF_TOWN),
@@ -331,7 +333,7 @@ static const SaveLoad _station_desc[] = {
SLE_REF(Station, bus_stops, REF_ROADSTOPS),
SLE_REF(Station, truck_stops, REF_ROADSTOPS),
SLE_VAR(Station, dock_tile, SLE_UINT32),
- SLE_VAR(Station, airport_tile, SLE_UINT32),
+ SLE_VAR(Station, airport.tile, SLE_UINT32),
SLE_VAR(Station, airport_type, SLE_UINT8),
SLE_VAR(Station, airport_flags, SLE_UINT64),