diff -r 29143d1fc6fa -r 82eae86fd29f indra/newview/llmutelist.cpp --- a/indra/newview/llmutelist.cpp Mon May 28 09:23:24 2012 -0400 +++ b/indra/newview/llmutelist.cpp Sun Jun 10 08:49:29 2012 +0200 @@ -44,6 +44,8 @@ #include "llmutelist.h" +#include "pipeline.h" + #include #include "lldispatcher.h" @@ -192,6 +194,23 @@ 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 @@ 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; } } diff -r 29143d1fc6fa -r 82eae86fd29f indra/newview/pipeline.h --- a/indra/newview/pipeline.h Mon May 28 09:23:24 2012 -0400 +++ b/indra/newview/pipeline.h Sun Jun 10 08:49:29 2012 +0200 @@ -151,6 +151,8 @@ void unlinkDrawable(LLDrawable*); + static void removeMutedAVsLights(LLVOAvatar*); + // Object related methods void markVisible(LLDrawable *drawablep, LLCamera& camera); void markOccluder(LLSpatialGroup* group); diff -r 29143d1fc6fa -r 82eae86fd29f indra/newview/pipeline.cpp --- a/indra/newview/pipeline.cpp Mon May 28 09:23:24 2012 -0400 +++ b/indra/newview/pipeline.cpp Sun Jun 10 08:49:29 2012 +0200 @@ -1635,6 +1635,21 @@ } +//static +void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) +{ + LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET); + for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); + iter != gPipeline.mNearbyLights.end(); iter++) + { + if (iter->drawable->getVObj()->isAttachment() && iter->drawable->getVObj()->getAvatar() == muted_avatar) + { + gPipeline.mLights.erase(iter->drawable); + gPipeline.mNearbyLights.erase(iter); + } + } +} + U32 LLPipeline::addObject(LLViewerObject *vobj) { LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);