summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-10 18:59:40 +0000
committeryexo <yexo@openttd.org>2010-03-10 18:59:40 +0000
commit22081cbd19a95c01bacc7db38d07a4d4a05f1e2c (patch)
tree6d2398a2edca5142421f112b07d662f1a8b32a4f
parent1a28aaf69eef8af1f9946caa5711b88da81ff0aa (diff)
downloadopenttd-22081cbd19a95c01bacc7db38d07a4d4a05f1e2c.tar.xz
(svn r19382) -Fix (r19381): don't break savegame version 139
-rw-r--r--src/saveload/afterload.cpp18
-rw-r--r--src/saveload/saveload.cpp2
-rw-r--r--src/saveload/station_sl.cpp4
3 files changed, 13 insertions, 11 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 70af6d474..bb6496e00 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2076,14 +2076,6 @@ 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;
- }
- }
-
Train *t;
FOR_ALL_TRAINS(t) {
/* Copy old GOINGUP / GOINGDOWN flags. */
@@ -2097,6 +2089,16 @@ bool AfterLoadGame()
}
}
+ if (CheckSavegameVersion(140)) {
+ 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/saveload.cpp b/src/saveload/saveload.cpp
index 5e2c51fde..0e8fea766 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -46,7 +46,7 @@
#include "saveload_internal.h"
-extern const uint16 SAVEGAME_VERSION = 139;
+extern const uint16 SAVEGAME_VERSION = 140;
SavegameType _savegame_type; ///< type of savegame we are loading
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp
index 27131965f..fae4fe5ec 100644
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -332,8 +332,8 @@ static const SaveLoad _station_desc[] = {
SLE_REF(Station, truck_stops, REF_ROADSTOPS),
SLE_VAR(Station, dock_tile, SLE_UINT32),
SLE_VAR(Station, airport.tile, SLE_UINT32),
- 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, airport.w, SLE_UINT8, 140, SL_MAX_VERSION),
+ SLE_CONDVAR(Station, airport.h, SLE_UINT8, 140, SL_MAX_VERSION),
SLE_VAR(Station, airport_type, SLE_UINT8),
SLE_VAR(Station, airport_flags, SLE_UINT64),