diff options
author | rubidium <rubidium@openttd.org> | 2011-11-03 22:49:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-03 22:49:03 +0000 |
commit | 47c5d30b5d967cf5c48f3de1c7ca1ee492f60002 (patch) | |
tree | b733935884805a61a58a0e2f55c57dc08e9499ca /src/saveload | |
parent | e98be8ed244e3d61ae0ae5c28bff8098bc2ff79f (diff) | |
download | openttd-47c5d30b5d967cf5c48f3de1c7ca1ee492f60002.tar.xz |
(svn r23084) -Codechange: get rid of a redundant variable
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 5 | ||||
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 2 |
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 |