summaryrefslogtreecommitdiff
path: root/src/saveload/afterload.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-02-22 14:17:07 +0000
committeryexo <yexo@openttd.org>2010-02-22 14:17:07 +0000
commit698737f485cfbdd1605faecd50395bb67f7dac75 (patch)
treeb79303520896365e70a9aa3224a5f1c6a14b5aba /src/saveload/afterload.cpp
parent7ca4c31cf558ff29b3cbe14cd348bcf649445dfc (diff)
downloadopenttd-698737f485cfbdd1605faecd50395bb67f7dac75.tar.xz
(svn r19198) -Codechange: store the size of stations in savegames
Diffstat (limited to 'src/saveload/afterload.cpp')
-rw-r--r--src/saveload/afterload.cpp12
1 files changed, 11 insertions, 1 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();