diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index d5ac15ef3..3c3067bbf 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1430,7 +1430,12 @@ void Game::changeMap(const std::string &mapPath) std::string oldMusic = mCurrentMap ? mCurrentMap->getMusicFile() : ""; std::string newMusic = newMap ? newMap->getMusicFile() : ""; if (newMusic != oldMusic) - sound.playMusic(newMusic); + { + if (newMusic.empty()) + sound.fadeOutMusic(); + else + sound.fadeOutAndPlayMusic(newMusic); + } if (mCurrentMap) mCurrentMap->saveExtraLayer(); |