summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp5
-rw-r--r--src/saveload/oldloader_sl.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index af6028d1c..d3fce84d0 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2648,6 +2648,11 @@ bool AfterLoadGame()
}
}
+ /* This triggers only when old snow_lines were copied into the snow_line_height. */
+ if (IsSavegameVersionBefore(164) && _settings_game.game_creation.snow_line_height >= MIN_SNOWLINE_HEIGHT * TILE_HEIGHT) {
+ _settings_game.game_creation.snow_line_height /= TILE_HEIGHT;
+ }
+
/* When any NewGRF has been changed the availability of some vehicles might
* have been changed too. e->company_avail must be set to 0 in that case
* which is done by StartupEngines(). */
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index d8a54b6e8..c38e0d78d 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -1724,7 +1724,7 @@ static const OldChunks main_chunk[] = {
OCL_VAR ( OC_TTD | OC_UINT8, 1, &_trees_tick_ctr ),
OCL_CNULL( OC_TTD, 1 ), ///< Custom vehicle types yes/no, no longer used
- OCL_VAR ( OC_TTD | OC_UINT8, 1, &_settings_game.game_creation.snow_line ),
+ OCL_VAR ( OC_TTD | OC_UINT8, 1, &_settings_game.game_creation.snow_line_height ),
OCL_CNULL( OC_TTD, 32 ), ///< new_industry_randtable, no longer used (because of new design)
OCL_CNULL( OC_TTD, 36 ), ///< cargo-stuff