diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-10-28 15:12:50 +0100 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-10-28 15:12:50 +0100 |
commit | 3350289ca6aa76c4b7249374af2f3f08fbecbe93 (patch) | |
tree | 74bed16a65a0bb701afeae22a38837df3d892e3c | |
parent | 3972b1dc68bb8643a27896a2e008764d0749e156 (diff) | |
download | mana-3350289ca6aa76c4b7249374af2f3f08fbecbe93.tar.gz mana-3350289ca6aa76c4b7249374af2f3f08fbecbe93.tar.bz2 mana-3350289ca6aa76c4b7249374af2f3f08fbecbe93.tar.xz mana-3350289ca6aa76c4b7249374af2f3f08fbecbe93.zip |
Fix music playing by calling maploaded after setting musicfile.
-rw-r--r-- | src/engine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index a938aace..e8f9503c 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -97,11 +97,6 @@ bool Engine::changeMap(const std::string &mapPath) particleEngine->setMap(newMap); viewport->setMap(newMap); - delete mCurrentMap; - mCurrentMap = newMap; - - Net::getGameHandler()->mapLoaded(mapPath); - // Initialize map-based particle effects if (newMap) newMap->initializeParticleEffects(particleEngine); @@ -112,6 +107,11 @@ bool Engine::changeMap(const std::string &mapPath) if (newMusic != oldMusic) sound.playMusic(newMusic); + delete mCurrentMap; + mCurrentMap = newMap; + + Net::getGameHandler()->mapLoaded(mapPath); + return true; } |