summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-30 04:39:13 +0300
committerAndrei Karas <akaras@inbox.ru>2011-03-30 04:39:13 +0300
commitd629f56517f55d1fd756c4774d9a368d66f615df (patch)
treea3675eb7af6b95bd33a8c9887bda5952a11fced5 /src/localplayer.cpp
parenta08839164df3ae37d216d810123f17eb968da1d4 (diff)
downloadplus-d629f56517f55d1fd756c4774d9a368d66f615df.tar.gz
plus-d629f56517f55d1fd756c4774d9a368d66f615df.tar.bz2
plus-d629f56517f55d1fd756c4774d9a368d66f615df.tar.xz
plus-d629f56517f55d1fd756c4774d9a368d66f615df.zip
Add background music map ranges.
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)