summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-11-03 12:54:02 +0000
committeryexo <yexo@openttd.org>2011-11-03 12:54:02 +0000
commite98be8ed244e3d61ae0ae5c28bff8098bc2ff79f (patch)
treef30ea8af16c60badcba2ea170ddc8e2ba2ad6915 /src/saveload
parent07cb2fd9a8a5a37e882c2f643d55a6252b534265 (diff)
downloadopenttd-e98be8ed244e3d61ae0ae5c28bff8098bc2ff79f.tar.xz
(svn r23083) -Fix: run StartupEngines() if NewGRFs changed during loading a savegame, just like it's running when NewGRFs are changed during a game
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 52f5e7bb5..af6028d1c 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2648,6 +2648,11 @@ bool AfterLoadGame()
}
}
+ /* When any NewGRF has been changed the availability of some vehicles might
+ * have been changed too. e->company_avail must be set to 0 in that case
+ * which is done by StartupEngines(). */
+ if (gcf_res != GLC_ALL_GOOD) StartupEngines();
+
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();