From 0fe0225751c801015e8153ef8457c984312f3c72 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 4 Feb 2011 16:40:38 +0000 Subject: (svn r21962) -Feature-ish: GUI setting to disable reversing at signals --- src/saveload/afterload.cpp | 10 ++++++++++ src/saveload/saveload.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/saveload') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 531db1d1d..a256087d2 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2551,6 +2551,16 @@ bool AfterLoadGame() } } + if (IsSavegameVersionBefore(159)) { + /* If the savegame is old (before version 100), then the value of 255 + * for these settings did not mean "disabled". As such everything + * before then did reverse. + * To simplify stuff we disable all turning around or we do not + * disable anything at all. So, if some reversing was disabled we + * will keep reversing disabled, otherwise it'll be turned on. */ + _settings_game.pf.reverse_at_signals = IsSavegameVersionBefore(100) || (_settings_game.pf.wait_oneway_signal != 255 && _settings_game.pf.wait_twoway_signal != 255 && _settings_game.pf.wait_for_pbs_path != 255); + } + /* Road stops is 'only' updating some caches */ AfterLoadRoadStops(); AfterLoadLabelMaps(); diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index ec85aedaf..9d22150ad 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -223,7 +223,7 @@ * 156 21728 * 157 21862 * 158 21933 - * 159 21960 + * 159 21962 */ extern const uint16 SAVEGAME_VERSION = 159; ///< Current savegame version of OpenTTD. -- cgit v1.2.3-70-g09d2