MAINT-8290 Don't render particles attached to the muted avatars
parent
8f65593786
commit
23960d2d94
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
class LLViewerTexture;
|
||||
class LLViewerObject;
|
||||
class LLViewerPart;
|
||||
class LLVOAvatar;
|
||||
|
||||
class LLViewerPartSource : public LLRefCount
|
||||
{
|
||||
|
|
@ -85,6 +86,7 @@ protected:
|
|||
F32 mLastUpdateTime;
|
||||
F32 mLastPartTime;
|
||||
LLUUID mOwnerUUID;
|
||||
LLPointer<LLVOAvatar> mOwnerAvatarp;
|
||||
LLPointer<LLViewerTexture> mImagep;
|
||||
// Particle information
|
||||
U32 mPartFlags; // Flags for the particle
|
||||
|
|
|
|||
Loading…
Reference in New Issue