diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-12 12:58:28 -0800 |
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-12 12:58:28 -0800 |
| commit | 0e6139eb3d3af1e77df20f87deef427993bf2c61 (patch) | |
| tree | 2c93f9a8d69f28cec99393b3cacbab85a8aa073d /indra/newview/llmutelist.cpp | |
| parent | 6f53b5baeb9e04c20c8fe6f419e09c9604a56497 (diff) | |
| parent | 7833ecb58094641d3cd79c6772ad6c9fd4799f92 (diff) | |
merging in latest 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; } } |
