diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-09-16 20:44:37 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-09-16 21:07:39 +0300 |
commit | 76491145885eb672961b564fa782af3777e08f12 (patch) | |
tree | 0929e225b721b2d4966d5cd205380c3b53d94446 /indra/newview/llviewermedia.cpp | |
parent | 5a3631659fb4fe8c2b70c90c490a6c7e486289e9 (diff) | |
parent | f83289d3a7e80bebe47f696f96aee1b7e64d1d69 (diff) |
Merge branch master (DRTVWR-571) into DRTVWR-559
# Conflicts:
# indra/newview/llpanelface.cpp
# indra/newview/llpanelface.h
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 661f70972d..636909e6f2 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3194,7 +3194,7 @@ bool LLViewerMediaImpl::isForcedUnloaded() const } // If this media's class is not supposed to be shown, unload - if (!shouldShowBasedOnClass()) + if (!shouldShowBasedOnClass() || isObscured()) { return true; } @@ -3881,6 +3881,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; |