diff options
| author | Oz Linden <oz@lindenlab.com> | 2012-08-22 08:46:19 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2012-08-22 08:46:19 -0400 |
| commit | 63d04204a99802d3200452e101d9bb1b898be881 (patch) | |
| tree | 457b4b2336afd03f982ff04b7340ec5cb8dfcda4 /indra/newview/llmutelist.cpp | |
| parent | 5949d605d757c97819b7b55d1860d36031a3d38f (diff) | |
| parent | e0f391df2a95192130bdfeb0d4f03ad6ca489eef (diff) | |
merge changes for DRTVWR-203
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; } } |
