summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 8fd63a641..baea3b1e6 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -26,6 +26,7 @@
#include "game.h"
#include "party.h"
#include "notifymanager.h"
+#include "soundmanager.h"
#include "units.h"
#include "being/attributes.h"
@@ -532,4 +533,15 @@ void PlayerHandler::processMapMask(Net::MessageIn &msg)
map->setMask(mask);
}
+void PlayerHandler::processMapMusic(Net::MessageIn &msg)
+{
+ const int size = msg.readInt16("len") - 5;
+ const std::string music = msg.readString(size, "name");
+ soundManager.playMusic(music);
+
+ Map *const map = viewport->getMap();
+ if (map)
+ map->setMusicFile(music);
+}
+
} // namespace Ea