summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorDennis Friis <peavey@inspircd.org>2009-05-19 00:20:47 +0200
committerDennis Friis <peavey@inspircd.org>2009-05-27 21:53:51 +0200
commitef3ca81ed1b59e4700db38768d7dc8c00b819cf0 (patch)
treeddb6300c274bd0a6ce71153d96fbe9bfc6dd0299 /src/gui
parent802481a7e19c45da2128de18359b44f1a95c476c (diff)
downloadmana-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.tar.gz
mana-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.tar.bz2
mana-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.tar.xz
mana-ef3ca81ed1b59e4700db38768d7dc8c00b819cf0.zip
Start playing map music if on a map when turning sound on.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_audio.cpp5
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)
{