summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-07-29 22:23:17 +0000
committerfrosch <frosch@openttd.org>2011-07-29 22:23:17 +0000
commitc9e920f1ebbeffb44ea44a240ad93ea246b14d7f (patch)
tree2d22f1ebdf356ee4284667d22d1416527cd7084b /src/newgrf.cpp
parent793ec45a7370a9e066968b24489f1d20ee5dd330 (diff)
downloadopenttd-c9e920f1ebbeffb44ea44a240ad93ea246b14d7f.tar.xz
(svn r22693) -Fix [FS#4691]: The override managers were not reset in some cases like creating a new scenario.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index f902ce601..86d2da2a6 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -7432,6 +7432,20 @@ void ResetNewGRFData()
_spritegroup_pool.CleanPool();
}
+/**
+ * Reset NewGRF data which is stored persistently in savegames.
+ */
+void ResetPersistentNewGRFData()
+{
+ /* Reset override managers */
+ _engine_mngr.ResetToDefaultMapping();
+ _house_mngr.ResetMapping();
+ _industry_mngr.ResetMapping();
+ _industile_mngr.ResetMapping();
+ _airport_mngr.ResetMapping();
+ _airporttile_mngr.ResetMapping();
+}
+
static void BuildCargoTranslationMap()
{
memset(_cur_grffile->cargo_map, 0xFF, sizeof(_cur_grffile->cargo_map));