summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerpartsource.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-22 12:55:19 +0300
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-22 12:55:19 +0300
commit5f432147e373c3223ac06797ecff147d447ed79f (patch)
tree942f163ad33ad3997aee3000cae321f5f693ad57 /indra/newview/llviewerpartsource.cpp
parent99d9befb629c97f7c778c8a9ddfb9d0060d54de9 (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
Merged lindenlab/viewer-release into default
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;