diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-05-30 19:07:29 +0300 | 
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-05-30 19:07:29 +0300 | 
| commit | 1e09d25d9ce8b7ec8da28ad5364d81c0faab9d0a (patch) | |
| tree | b049cb785866fca973d59a3f6abb558855972ee6 /indra | |
| parent | 14e3104f864206cd7bcdd33e76c7304205105923 (diff) | |
SL-16297 Don't play moap located outside the parcel, If an agent is standing in a parcel with this flag set
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.h | 1 | 
2 files changed, 22 insertions, 1 deletions
| diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 29c926ca64..2f2dc2bcba 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3103,7 +3103,7 @@ bool LLViewerMediaImpl::isForcedUnloaded() const  	}  	// If this media's class is not supposed to be shown, unload -	if (!shouldShowBasedOnClass()) +	if (!shouldShowBasedOnClass() || isObscured())  	{  		return true;  	} @@ -3790,6 +3790,26 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const  //////////////////////////////////////////////////////////////////////////////////////////  // +bool LLViewerMediaImpl::isObscured() const +{ +    if (getUsedInUI() || isParcelMedia()) return false; + +    LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); +    if (!agent_parcel) +    { +        return false; +    } +     +    if (agent_parcel->getObscureMOAP() && !isInAgentParcel()) +    { +        return true; +    } + +    return false; +} + +////////////////////////////////////////////////////////////////////////////////////////// +//  bool LLViewerMediaImpl::isAttachedToAnotherAvatar() const  {  	bool result = false; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 71cec5125d..ad1d7f0d70 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -421,6 +421,7 @@ public:  private:  	bool isAutoPlayable() const;  	bool shouldShowBasedOnClass() const; +	bool isObscured() const;  	static bool isObjectAttachedToAnotherAvatar(LLVOVolume *obj);  	static bool isObjectInAgentParcel(LLVOVolume *obj); | 
