aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--linden/indra/newview/llviewerparcelmgr.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp
index 5ef6f83..2dee2bf 100644
--- a/linden/indra/newview/llviewerparcelmgr.cpp
+++ b/linden/indra/newview/llviewerparcelmgr.cpp
@@ -1692,7 +1692,12 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
1692 1692
1693void optionally_start_music(const std::string& music_url) 1693void optionally_start_music(const std::string& music_url)
1694{ 1694{
1695 if (gSavedSettings.getBOOL("AudioStreamingMusic")) 1695 // Check to see if this your first time on a music-enabled parcel.
1696 if (gSavedSettings.getWarning("FirstStreamingMusic"))
1697 {
1698 gViewerWindow->alertXml("ParcelCanPlayMusic", callback_start_music, (void*)&music_url);
1699 }
1700 else if (gSavedSettings.getBOOL("AudioStreamingMusic"))
1696 { 1701 {
1697 // Make the user click the start button on the overlay bar. JC 1702 // Make the user click the start button on the overlay bar. JC
1698 // llinfos << "Starting parcel music " << music_url << llendl; 1703 // llinfos << "Starting parcel music " << music_url << llendl;
@@ -1706,6 +1711,21 @@ void optionally_start_music(const std::string& music_url)
1706 } 1711 }
1707} 1712}
1708 1713
1714
1715void callback_start_music(S32 option, void* data)
1716{
1717 if (option == 0)
1718 {
1719 // Before the callback, we verified the url was good.
1720 // We fetch again to avoid lag while loading.
1721 LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
1722 gAudiop->startInternetStream(parcel->getMusicURL());
1723
1724 LLOverlayBar::musicFirstRun();
1725 }
1726 gSavedSettings.setWarning("FirstStreamingMusic", FALSE);
1727}
1728
1709// static 1729// static
1710void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void **user) 1730void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void **user)
1711{ 1731{