diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-05-19 00:20:47 +0200 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-05-27 21:53:51 +0200 |
commit | ef3ca81ed1b59e4700db38768d7dc8c00b819cf0 (patch) | |
tree | ddb6300c274bd0a6ce71153d96fbe9bfc6dd0299 /src/gui/setup_audio.cpp | |
parent | 802481a7e19c45da2128de18359b44f1a95c476c (diff) | |
download | mana-client-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.tar.gz mana-client-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.tar.bz2 mana-client-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.tar.xz mana-client-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.zip |
Start playing map music if on a map when turning sound on.
Diffstat (limited to 'src/gui/setup_audio.cpp')
-rw-r--r-- | src/gui/setup_audio.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp index 9da74c2e..476d7b9a 100644 --- a/src/gui/setup_audio.cpp +++ b/src/gui/setup_audio.cpp @@ -28,6 +28,8 @@ #include "gui/widgets/layouthelper.h" #include "gui/widgets/slider.h" +#include "engine.h" +#include "map.h" #include "configuration.h" #include "log.h" #include "sound.h" @@ -88,6 +90,9 @@ void Setup_Audio::apply() try { sound.init(); + Map *currentMap = engine->getCurrentMap(); + if (currentMap) + sound.playMusic(currentMap->getProperty("music")); } catch (const char *err) { |