# HG changeset patch # User rubidium # Date 1215207797 0 # Node ID 663d70751a3de8da61295b7e23bdf624e574f2ac # Parent 13e48c238127442bf7f4a947ac49b466c22314e0 (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. diff -r 13e48c238127 -r 663d70751a3d src/openttd.cpp --- a/src/openttd.cpp Fri Jul 04 19:00:11 2008 +0000 +++ b/src/openttd.cpp Fri Jul 04 21:43:17 2008 +0000 @@ -1382,6 +1382,16 @@ /* 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 @@ } } - /* 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)) {