diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-10-16 21:02:48 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-10-16 21:02:48 -0400 |
| commit | c370313676451f6e5cfd72bec314ad79bc653833 (patch) | |
| tree | 1bd99330b482d828f8edc71691d177078123fd1e /indra/newview/llmutelist.cpp | |
| parent | 988767d5ec4631ad9f0099180a92c4f186553940 (diff) | |
| parent | f2e2ea99a351ca8663af460974137545d020b97f (diff) | |
Automated merge with file:///Users/nat/linden/viewer-sourceid
Diffstat (limited to 'indra/newview/llmutelist.cpp')
| -rw-r--r-- | indra/newview/llmutelist.cpp | 25 |
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; } } |
