summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
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;