merge changes for storm-1878
commit
84574fe30a
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1635,6 +1635,21 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
|
|||
|
||||
}
|
||||
|
||||
//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);
|
||||
|
|
|
|||
|
|
@ -151,6 +151,8 @@ public:
|
|||
|
||||
void unlinkDrawable(LLDrawable*);
|
||||
|
||||
static void removeMutedAVsLights(LLVOAvatar*);
|
||||
|
||||
// Object related methods
|
||||
void markVisible(LLDrawable *drawablep, LLCamera& camera);
|
||||
void markOccluder(LLSpatialGroup* group);
|
||||
|
|
|
|||
Loading…
Reference in New Issue