summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-07 09:06:27 +0100
committerPatric Stout <github@truebrain.nl>2021-01-08 11:17:08 +0100
commitef6b17baf74119e5c1515482cd6feb837afbe90b (patch)
tree66cafe27944426ecf6c73482d752b71c3a958c52 /src/saveload
parenta1987df96acda0f58f88f2e154e26c529f59670b (diff)
downloadopenttd-ef6b17baf74119e5c1515482cd6feb837afbe90b.tar.xz
Fix 2fd871e2af5: load correct ending-year for old (pre 0.7) savegames
Despite what it looked like, you could never really change the ending-year (it was always reset to 2050 on start-up). See commit 683b65ee1 for details. As a side-effect, the variable that was suppose to store the ending-year was just zero, never containing a real ending-year.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index c3aef307b..42e36022a 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -755,12 +755,7 @@ bool AfterLoadGame()
_settings_game.linkgraph.distribution_default = DT_MANUAL;
}
- if (IsSavegameVersionBefore(SLV_105)) {
- extern int32 _old_ending_year_slv_105; // in date.cpp
- _settings_game.game_creation.ending_year = _old_ending_year_slv_105 - 1;
- } else if (IsSavegameVersionBefore(SLV_ENDING_YEAR)) {
- /* Ending year was a GUI setting before SLV_105, was removed in revision 683b65ee1 (svn r14755). */
- /* This also converts scenarios, both when loading them into the editor, and when starting a new game. */
+ if (IsSavegameVersionBefore(SLV_ENDING_YEAR)) {
_settings_game.game_creation.ending_year = DEF_END_YEAR;
}