summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-22 15:25:22 -0600
committerIra Rice <irarice@gmail.com>2009-03-22 15:25:22 -0600
commit3fc81e3ad181f6904277e73d99d753a8b7498bf0 (patch)
tree3cbe44fb2b59645d5d58f39b54a2987a2a29808f /src/engine.cpp
parent347452b9b69ef3af29c577b7751082822e900c01 (diff)
downloadmana-client-3fc81e3ad181f6904277e73d99d753a8b7498bf0.tar.gz
mana-client-3fc81e3ad181f6904277e73d99d753a8b7498bf0.tar.bz2
mana-client-3fc81e3ad181f6904277e73d99d753a8b7498bf0.tar.xz
mana-client-3fc81e3ad181f6904277e73d99d753a8b7498bf0.zip
Fixed map name saving in the engine class. Somehow, the const gets
overridden after map_path, so the saved map path needs to get saved before that. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index cc19bd72..8ef2b9c6 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -66,6 +66,8 @@ void Engine::changeMap(const std::string &mapPath)
particleEngine->clear();
+ mMapName = mapPath;
+
// Store full map path in global var
map_path = "maps/" + mapPath.substr(0, mapPath.rfind(".")) + ".tmx";
ResourceManager *resman = ResourceManager::getInstance();
@@ -128,7 +130,6 @@ void Engine::changeMap(const std::string &mapPath)
sound.playMusic(newMusic, -1);
mCurrentMap = newMap;
- mMapName = mapPath;
// Send "map loaded"
MessageOut outMsg(mNetwork);