diff options
-rw-r--r-- | engines/hdb/hdb.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 054ae22c09..92d2939ff0 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -34,6 +34,8 @@ #include "hdb/console.h" #include "hdb/menu.h" +#define CHEAT_PATCHES 1 + namespace HDB { HDBGame* g_hdb; @@ -163,13 +165,6 @@ bool HDBGame::restartMap() { _lua->init(); _lua->loadLua(_currentLuaName); - // Cheat/workarounds - if (!strcmp(_currentLuaName, "MAP00.LUA")) { - Common::String patch("KillTrigger( \"mannyquest\" )"); - - _lua->executeChunk(patch, "MAP00 patch"); - } - _sound->markSoundCacheFreeable(); _map->restartSystem(); @@ -178,6 +173,15 @@ bool HDBGame::restartMap() { _ai->initAnimInfo(); + // Cheat/workarounds +#if CHEAT_PATCHES + if (!strcmp(_currentLuaName, "MAP00.LUA")) { + Common::String patch("KillTrigger( \"mannyquest\" )"); + + _lua->executeChunk(patch, "MAP00 patch"); + } +#endif + // if there are Secret Stars here, stick the variable in Lua if (!_menu->_starWarp && getStarsMonkeystone7() == STARS_MONKEYSTONE_7) _lua->setLuaGlobalValue("secretstars", 1); |