summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerpartsource.cpp
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-23 01:16:12 +0100
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-23 01:16:12 +0100
commit439273c9c11ec5f3c186fd7d97a28d11419153cd (patch)
treef6e4f1566425921d71e40b9628011eb0f5f539f3 /indra/newview/llviewerpartsource.cpp
parent13536bb273b7413aa4461c8eeaf5a6a865f4234d (diff)
parent689beff6698fcb8582c44f58bb9896606850b149 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewerpartsource.cpp')
-rw-r--r--indra/newview/llviewerpartsource.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 814060f4f2..998ae52fe0 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -40,6 +40,25 @@
#include "llworld.h"
#include "pipeline.h"
+
+static LLVOAvatar* find_avatar(const LLUUID& id)
+{
+ LLViewerObject *obj = gObjectList.findObject(id);
+ while (obj && obj->isAttachment())
+ {
+ obj = (LLViewerObject *)obj->getParent();
+ }
+
+ if (obj && obj->isAvatar())
+ {
+ return (LLVOAvatar*)obj;
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
LLViewerPartSource::LLViewerPartSource(const U32 type) :
mType(type),
mOwnerUUID(LLUUID::null),
@@ -113,6 +132,15 @@ void LLViewerPartSourceScript::update(const F32 dt)
if( mIsSuspended )
return;
+ if (mOwnerAvatarp.isNull() && mOwnerUUID != LLUUID::null)
+ {
+ mOwnerAvatarp = find_avatar(mOwnerUUID);
+ }
+ if (mOwnerAvatarp.notNull() && LLVOAvatar::AV_DO_NOT_RENDER == mOwnerAvatarp->getVisualMuteSettings())
+ {
+ return;
+ }
+
F32 old_update_time = mLastUpdateTime;
mLastUpdateTime += dt;