summaryrefslogtreecommitdiff
path: root/indra/newview/llmutelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rw-r--r--indra/newview/llmutelist.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index a7059eb519..54522bb7f6 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -44,6 +44,8 @@
#include "llmutelist.h"
+#include "pipeline.h"
+
#include <boost/tokenizer.hpp>
#include "lldispatcher.h"
@@ -192,6 +194,23 @@ BOOL LLMuteList::isLinden(const std::string& name) const
return last_name == "Linden";
}
+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;
+ }
+}
BOOL LLMuteList::add(const LLMute& mute, U32 flags)
{
@@ -288,6 +307,12 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
LLViewerPartSim::getInstance()->clearParticlesByOwnerID(localmute.mID);
}
}
+ //mute local lights that are attached to the avatar
+ LLVOAvatar *avatarp = find_avatar(localmute.mID);
+ if (avatarp)
+ {
+ LLPipeline::removeMutedAVsLights(avatarp);
+ }
return TRUE;
}
}