Muting an avatar now also removes their attached lights. Also cleaned up light update code(no change in behavior)
This commit is contained in:
@@ -295,6 +295,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)
|
||||
{
|
||||
@@ -391,6 +408,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user