summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-05 19:36:04 +0000
committerfrosch <frosch@openttd.org>2012-12-05 19:36:04 +0000
commit812ae4140a8566c2b4b43c6aa5bab5eecf82f18a (patch)
treeb79a9960ef438be736d9768a71336f8dd60f9416 /src/saveload
parente43bf5dabdb4a62b4e6b6812db422b962b4eaaf1 (diff)
downloadopenttd-812ae4140a8566c2b4b43c6aa5bab5eecf82f18a.tar.xz
(svn r24789) -Add: Separate setting to control the default settings of newly added scripts and random AIs.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp5
-rw-r--r--src/saveload/saveload.cpp3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 5d02ed1d1..5937318aa 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2755,6 +2755,11 @@ bool AfterLoadGame()
}
}
+ if (IsSavegameVersionBefore(178)) {
+ /* Initialise script settings profile */
+ _settings_game.script.settings_profile = IsInsideMM(_settings_game.difficulty.diff_level, SP_BEGIN, SP_END) ? _settings_game.difficulty.diff_level : (uint)SP_MEDIUM;
+ }
+
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 1e64c83f5..7d74798bd 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -241,8 +241,9 @@
* 175 24136
* 176 24446
* 177 24619
+ * 178 TODO
*/
-extern const uint16 SAVEGAME_VERSION = 177; ///< Current savegame version of OpenTTD.
+extern const uint16 SAVEGAME_VERSION = 178; ///< Current savegame version of OpenTTD.
SavegameType _savegame_type; ///< type of savegame we are loading