summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 0533290b3..e94a9bed1 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -3226,6 +3226,15 @@ void LocalPlayer::updateCoords()
socialWindow->updatePortals();
if (viewport)
viewport->hideBeingPopup();
+ if (mMap)
+ {
+ std::string str = mMap->getObjectData(getTileX(), getTileY(),
+ MapItem::MUSIC);
+ if (str.empty())
+ str = mMap->getMusicFile();
+ if (str != sound.getCurrentMusicFile())
+ sound.playMusic(str);
+ }
}
if (mShowNavigePath)