summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-10-10 15:59:22 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-10-10 15:59:22 +0100
commit9ad912b601425bef843bfc45e9d8075623c37584 (patch)
tree99ce79c0ebfd42366df4936bde2cceff9d5ba4dc /indra/newview
parentae041779ccc83b1acc8a01528918d52aab9f565f (diff)
SL-9849 - animated object attachments get isImpostor() state from av they're attached to
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llcontrolavatar.cpp15
-rw-r--r--indra/newview/llcontrolavatar.h4
-rw-r--r--indra/newview/llvoavatar.cpp1
-rw-r--r--indra/newview/llvoavatar.h2
4 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 4b70d625d4..15ed2073b4 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -590,3 +590,18 @@ bool LLControlAvatar::shouldRenderRigged() const
}
return true;
}
+
+// virtual
+BOOL LLControlAvatar::isImpostor()
+{
+ if (mRootVolp && mRootVolp->isAttachment())
+ {
+ // Attached animated objects should match state of their attached av.
+ LLVOAvatar *attached_av = mRootVolp->getAvatarAncestor();
+ if (attached_av)
+ {
+ return attached_av->isImpostor();
+ }
+ }
+ return LLVOAvatar::isImpostor();
+}
diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h
index f7f8db2717..70f6b76a21 100644
--- a/indra/newview/llcontrolavatar.h
+++ b/indra/newview/llcontrolavatar.h
@@ -73,7 +73,9 @@ public:
virtual std::string getFullname() const;
- /* virtual */ bool shouldRenderRigged() const;
+ virtual bool shouldRenderRigged() const;
+
+ virtual BOOL isImpostor();
bool mPlaying;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 34e82d878a..8005be6776 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -9721,6 +9721,7 @@ void LLVOAvatar::updateImpostors()
LLCharacter::sAllowInstancesChange = TRUE;
}
+// virtual
BOOL LLVOAvatar::isImpostor()
{
return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e6b1477758..3e65f8d5a7 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -516,7 +516,7 @@ private:
// Impostors
//--------------------------------------------------------------------
public:
- BOOL isImpostor();
+ virtual BOOL isImpostor();
BOOL shouldImpostor(const U32 rank_factor = 1) const;
BOOL needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;