summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerpartsource.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2018-05-29 11:49:46 -0400
committerOz Linden <oz@lindenlab.com>2018-05-29 11:49:46 -0400
commitc18a4cb0117b6e865a72a01465606c67a7e3bf6d (patch)
tree25abf867eabd03b7804a1e36e9c9af2513636cc7 /indra/newview/llviewerpartsource.cpp
parent77344afa8b39b4c1fcebda4de63998a67fd4debb (diff)
parentc70119ebabc4b06e2b0db02aea8c56e01fbc666e (diff)
merge changes for 5.1.4-release
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;