Media stream cleared when entering parcel with invalid media url
This commit is contained in:
@@ -763,13 +763,17 @@ BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
|
|||||||
BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
|
BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
|
||||||
{
|
{
|
||||||
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(pos_global);
|
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(pos_global);
|
||||||
if (region != gAgent.getRegion())
|
LLViewerRegion* agent_region = gAgent.getRegion();
|
||||||
|
if (!region || !agent_region)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (region != agent_region)
|
||||||
{
|
{
|
||||||
// Can't be in the agent parcel if you're not in the same region.
|
// Can't be in the agent parcel if you're not in the same region.
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVector3 pos_region = gAgent.getRegion()->getPosRegionFromGlobal(pos_global);
|
LLVector3 pos_region = agent_region->getPosRegionFromGlobal(pos_global);
|
||||||
S32 row = S32(pos_region.mV[VY] / PARCEL_GRID_STEP_METERS);
|
S32 row = S32(pos_region.mV[VY] / PARCEL_GRID_STEP_METERS);
|
||||||
S32 column = S32(pos_region.mV[VX] / PARCEL_GRID_STEP_METERS);
|
S32 column = S32(pos_region.mV[VX] / PARCEL_GRID_STEP_METERS);
|
||||||
|
|
||||||
@@ -838,8 +842,11 @@ void LLViewerParcelMgr::renderParcelCollision()
|
|||||||
if (mRenderCollision && gSavedSettings.getBOOL("ShowBanLines"))
|
if (mRenderCollision && gSavedSettings.getBOOL("ShowBanLines"))
|
||||||
{
|
{
|
||||||
LLViewerRegion* regionp = gAgent.getRegion();
|
LLViewerRegion* regionp = gAgent.getRegion();
|
||||||
BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST);
|
if (regionp)
|
||||||
renderCollisionSegments(mCollisionSegments, use_pass, regionp);
|
{
|
||||||
|
BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST);
|
||||||
|
renderCollisionSegments(mCollisionSegments, use_pass, regionp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1684,10 +1691,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||||||
{
|
{
|
||||||
optionally_start_music(music_url);
|
optionally_start_music(music_url);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
|
||||||
|
// clears the URL
|
||||||
|
gAudiop->startInternetStream(LLStringUtil::null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!gAudiop->getInternetStreamURL().empty())
|
else if (!gAudiop->getInternetStreamURL().empty())
|
||||||
{
|
{
|
||||||
llinfos << "Stopping parcel music" << llendl;
|
llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
|
||||||
gAudiop->startInternetStream(LLStringUtil::null);
|
gAudiop->startInternetStream(LLStringUtil::null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user