diff options
| author | Logan Dethrow <log@lindenlab.com> | 2012-12-07 17:50:37 -0500 |
|---|---|---|
| committer | Logan Dethrow <log@lindenlab.com> | 2012-12-07 17:50:37 -0500 |
| commit | b6a7c8fcfdaf9220accf832a4dc07efcd08c6eeb (patch) | |
| tree | 621f992abc5e2d0ccc596a824ba70828c463ae87 /indra/newview/llmutelist.cpp | |
| parent | 954200e97f0283a2f16d19601129d64fb16449c2 (diff) | |
| parent | a15ec8d014307da35b792659964cd5478d1aafe7 (diff) | |
Merge in backed out changes.
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; } } |
