diff options
author | andreykproductengine <akleshchev@productengine.com> | 2016-01-25 18:50:57 +0200 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2016-01-25 18:50:57 +0200 |
commit | 6c218c076b03b73a2c1e7dd68e8c875ea747395f (patch) | |
tree | 6fa8befff55bd14ab39b395ef96cce773d45f126 /indra/newview | |
parent | dab96aad7f0af2017cb931eb4cdaf5367f835e29 (diff) |
MAINT-6042 region crossing in any form should trigger music check
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llviewerparcelmgr.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index e4d24823f7..abdbaaca03 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1756,17 +1756,22 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use { std::string music_url_raw = parcel->getMusicURL(); const std::string& stream_url = gAudiop->getInternetStreamURL(); + LLUUID region_id = gAgent.getRegion()->getRegionID(); // Trim off whitespace from front and back std::string music_url = music_url_raw; LLStringUtil::trim(music_url); static std::string last_url = ""; + static LLUUID last_region_id = LLUUID::null; - // If music url is valid and url is a new or teleport was performed - play music. + // If music url is valid and url is a new or teleport/region cross was performed - play music. // If url is empty or not usable and there is stream playing - stop music // In all other cases maintain previous state - if (music_url.size() > 12 && (music_url != last_url || agent_teleported)) + if (music_url.size() > 12 + && (music_url != last_url + || agent_teleported + || last_region_id != region_id)) { if (music_url.substr(0,7) == "http://") { @@ -1787,6 +1792,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); } last_url = music_url; + last_region_id = region_id; } else { |