diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-09-28 17:01:24 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-09-28 17:01:24 +0300 |
commit | c88767e27d7d4f2ca1781ff3aab74b1226e10207 (patch) | |
tree | e5964952d6eaedd274285cbe60914dc518d2ef63 /indra | |
parent | 26c8883bb7d1e61935334701bad5e3e3c7f17de7 (diff) |
SL-18240 Don't disable HUD media when "Obscure MOAP" is active on land
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llviewermedia.h | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 636909e6f2..a1cb152e1e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3883,7 +3883,7 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const // bool LLViewerMediaImpl::isObscured() const { - if (getUsedInUI() || isParcelMedia()) return false; + if (getUsedInUI() || isParcelMedia() || isAttachedToHUD()) return false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (!agent_parcel) @@ -3899,6 +3899,20 @@ bool LLViewerMediaImpl::isObscured() const return false; } +bool LLViewerMediaImpl::isAttachedToHUD() const +{ + std::list< LLVOVolume* >::const_iterator iter = mObjectList.begin(); + std::list< LLVOVolume* >::const_iterator end = mObjectList.end(); + for ( ; iter != end; iter++) + { + if ((*iter)->isHUDAttachment()) + { + return true; + } + } + return false; +} + ////////////////////////////////////////////////////////////////////////////////////////// // bool LLViewerMediaImpl::isAttachedToAnotherAvatar() const diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b95cfd4c68..f1f42afd81 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -411,6 +411,8 @@ public: void cancelMimeTypeProbe(); + bool isAttachedToHUD() const; + // Is this media attached to an avatar *not* self bool isAttachedToAnotherAvatar() const; |