summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-09-28 17:37:33 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-09-28 17:37:33 +0300
commit6661e0fdc5becd17d438e0a1a5c47094598667fc (patch)
treec225cb05df1fb5182c83a01c5634cce77b8f4f5b
parent687ba77897a1438a3a066f588f8bbc832eb2e9a3 (diff)
SL-18240 Don't disable HUD media when "Obscure MOAP" is active on land
-rw-r--r--indra/newview/llviewermedia.cpp16
-rw-r--r--indra/newview/llviewermedia.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 84013c488f..8570c0cd5d 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3896,7 +3896,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)
@@ -3912,6 +3912,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;