diff options
-rw-r--r-- | engines/scumm/scumm.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 9518ed4e5c..7d927b0cda 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -2601,20 +2601,24 @@ bool ScummEngine::startManiac() { Common::String currentPath = ConfMan.get("path"); Common::String maniacTarget; - // Look for a game with a game path pointing to a 'Maniac' directory - // as a subdirectory to the current game. - Common::ConfigManager::DomainMap::iterator iter = ConfMan.beginGameDomains(); - for (; iter != ConfMan.endGameDomains(); ++iter) { - Common::ConfigManager::Domain &dom = iter->_value; - Common::String path = dom.getVal("path"); - - if (path.hasPrefix(currentPath)) { - path.erase(0, currentPath.size() + 1); - if (path.equalsIgnoreCase("maniac")) { - maniacTarget = dom.getVal("gameid"); - break; + if (!ConfMan.hasKey("easter_egg")) { + // Look for a game with a game path pointing to a 'Maniac' directory + // as a subdirectory to the current game. + Common::ConfigManager::DomainMap::iterator iter = ConfMan.beginGameDomains(); + for (; iter != ConfMan.endGameDomains(); ++iter) { + Common::ConfigManager::Domain &dom = iter->_value; + Common::String path = dom.getVal("path"); + + if (path.hasPrefix(currentPath)) { + path.erase(0, currentPath.size() + 1); + if (path.equalsIgnoreCase("maniac")) { + maniacTarget = dom.getVal("gameid"); + break; + } } } + } else { + maniacTarget = ConfMan.get("easter_egg"); } if (!maniacTarget.empty()) { |