diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-30 04:39:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-30 04:39:13 +0300 |
commit | d629f56517f55d1fd756c4774d9a368d66f615df (patch) | |
tree | a3675eb7af6b95bd33a8c9887bda5952a11fced5 /src/localplayer.cpp | |
parent | a08839164df3ae37d216d810123f17eb968da1d4 (diff) | |
download | manaverse-d629f56517f55d1fd756c4774d9a368d66f615df.tar.gz manaverse-d629f56517f55d1fd756c4774d9a368d66f615df.tar.bz2 manaverse-d629f56517f55d1fd756c4774d9a368d66f615df.tar.xz manaverse-d629f56517f55d1fd756c4774d9a368d66f615df.zip |
Add background music map ranges.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 9 |
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) |