diff options
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 4a0f2f1f..4e37dc27 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -72,15 +72,11 @@ void Engine::changeMap(const std::string &mapPath) particleEngine->clear(); // Store full map path in global var - const std::string base = "maps/" + mapPath.substr(0, mapPath.rfind(".")); + map_path = "maps/" + mapPath.substr(0, mapPath.rfind(".")) + ".tmx"; ResourceManager *resman = ResourceManager::getInstance(); - if (resman->exists(base + ".tmx")) + if (!resman->exists(map_path)) { - map_path = base + ".tmx"; - } - else - { - map_path = base + ".tmx.gz"; + map_path += ".gz"; } // Attempt to load the new map |