summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-04 21:43:17 +0000
committerrubidium <rubidium@openttd.org>2008-07-04 21:43:17 +0000
commitba22744899931a20f54d61757471474f0cf63a09 (patch)
treee57319f5dea55fb32e2f1dfb554425ad8debfbe0 /src
parent7375d5641871b1ea386938152ad624e79cd5add5 (diff)
downloadopenttd-ba22744899931a20f54d61757471474f0cf63a09.tar.xz
(svn r13677) -Fix [FS#2102]: in the case that elrails and 'realistic' acceleration are disabled all electrified engines would have no power on load, until the vehicle got turned around, loaded or got into a depot.
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 817aace13..28280d864 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1382,6 +1382,16 @@ bool AfterLoadGame()
/* reinit the landscape variables (landscape might have changed) */
InitializeLandscapeVariables(true);
+ /* from version 38 we have optional elrails, since we cannot know the
+ * preference of a user, let elrails enabled; it can be disabled manually */
+ if (CheckSavegameVersion(38)) _settings_game.vehicle.disable_elrails = false;
+
+ /* Do the same as when elrails were enabled/disabled manually just now.
+ * This needs to be done before AfterLoadVehicles because that relies on
+ * the compatible railtypes and such to be correct. */
+ SettingsDisableElrail(_settings_game.vehicle.disable_elrails);
+ InitializeRailGUI();
+
/* Update all vehicles */
AfterLoadVehicles(true);
@@ -1953,13 +1963,6 @@ bool AfterLoadGame()
}
}
- /* from version 38 we have optional elrails, since we cannot know the
- * preference of a user, let elrails enabled; it can be disabled manually */
- if (CheckSavegameVersion(38)) _settings_game.vehicle.disable_elrails = false;
- /* do the same as when elrails were enabled/disabled manually just now */
- SettingsDisableElrail(_settings_game.vehicle.disable_elrails);
- InitializeRailGUI();
-
/* From version 53, the map array was changed for house tiles to allow
* space for newhouses grf features. A new byte, m7, was also added. */
if (CheckSavegameVersion(53)) {