diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-06-20 13:51:30 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-06-20 13:51:30 +0000 |
commit | 12371444ef58176bbf7bd5716a223e707a5942e7 (patch) | |
tree | f480c9545d8a07c071682ef85cd43919e8f53bb3 /src/engine.cpp | |
parent | c204288633cd8f07720a1288a10f3c111de1599c (diff) | |
download | mana-12371444ef58176bbf7bd5716a223e707a5942e7.tar.gz mana-12371444ef58176bbf7bd5716a223e707a5942e7.tar.bz2 mana-12371444ef58176bbf7bd5716a223e707a5942e7.tar.xz mana-12371444ef58176bbf7bd5716a223e707a5942e7.zip |
Hammerbear suggestion: removing duplicated code
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 76edc0b5..fac158bf 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -270,6 +270,12 @@ void Engine::setCurrentMap(Map *newMap) { mCurrentMap = newMap; minimap->setMap(mCurrentMap); + std::string musicFile = newMap->getProperty("music"); + + if(musicFile!="") { + musicFile = std::string(TMW_DATADIR) + "data/music/" + musicFile; + sound.playMusic(musicFile.c_str(), -1); + } } void Engine::logic() |