diff options
author | rubidium <rubidium@openttd.org> | 2008-07-06 11:08:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-06 11:08:40 +0000 |
commit | 3a793ceea95edefc878531bc67e1bc4a6116a9b0 (patch) | |
tree | 7a34f2cdc4f3963847cbcad8729e0ccfa69bc724 /src/openttd.cpp | |
parent | 22249a7317753816ba56618e753e0ddf6a29551a (diff) | |
download | openttd-3a793ceea95edefc878531bc67e1bc4a6116a9b0.tar.xz |
(svn r13678) -Fix (r13677): electric trains from pre elrail savegames would get stopped on load.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 28280d864..3c33f571b 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1265,6 +1265,8 @@ static bool InitializeWindowsAndCaches() } } + InitializeVehicleCaches(); + SetCachedEngineCounts(); /* Towns have a noise controlled number of airports system @@ -1382,16 +1384,6 @@ 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); @@ -1963,6 +1955,13 @@ 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)) { |