Merged in MAINT-2880
Approved-by: Andrey Kleshchev <andreykproductengine@lindenlab.com> Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com> Approved-by: Simon Linden <simon@lindenlab.com>meow-7.2.2
commit
9d962be2a8
|
|
@ -316,14 +316,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
|
|||
updateAdd(localmute);
|
||||
notifyObservers();
|
||||
notifyObserversDetailed(localmute);
|
||||
if(!(localmute.mFlags & LLMute::flagParticles))
|
||||
{
|
||||
//Kill all particle systems owned by muted task
|
||||
if(localmute.mType == LLMute::AGENT || localmute.mType == LLMute::OBJECT)
|
||||
{
|
||||
LLViewerPartSim::getInstance()->clearParticlesByOwnerID(localmute.mID);
|
||||
}
|
||||
}
|
||||
|
||||
//mute local lights that are attached to the avatar
|
||||
LLVOAvatar *avatarp = find_avatar(localmute.mID);
|
||||
if (avatarp)
|
||||
|
|
|
|||
|
|
@ -270,7 +270,9 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
|
|||
mPhysicsShapeUnknown(true),
|
||||
mAttachmentItemID(LLUUID::null),
|
||||
mLastUpdateType(OUT_UNKNOWN),
|
||||
mLastUpdateCached(FALSE)
|
||||
mLastUpdateCached(FALSE),
|
||||
mCachedMuteListUpdateTime(0),
|
||||
mCachedOwnerInMuteList(false)
|
||||
{
|
||||
if (!is_global)
|
||||
{
|
||||
|
|
@ -5116,6 +5118,29 @@ void LLViewerObject::updateText()
|
|||
}
|
||||
}
|
||||
|
||||
bool LLViewerObject::isOwnerInMuteList()
|
||||
{
|
||||
if (isAvatar() || mOwnerID.isNull())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool muted = false;
|
||||
F64 now = LLFrameTimer::getTotalSeconds();
|
||||
if (now < mCachedMuteListUpdateTime)
|
||||
{
|
||||
muted = mCachedOwnerInMuteList;
|
||||
}
|
||||
else
|
||||
{
|
||||
muted = LLMuteList::getInstance()->isMuted(mOwnerID);
|
||||
|
||||
const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1;
|
||||
mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES;
|
||||
mCachedOwnerInMuteList = muted;
|
||||
}
|
||||
return muted;
|
||||
}
|
||||
|
||||
LLVOAvatar* LLViewerObject::asAvatar()
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -422,6 +422,8 @@ public:
|
|||
void updateText(); // update text label position
|
||||
virtual void updateDrawable(BOOL force_damped); // force updates on static objects
|
||||
|
||||
bool isOwnerInMuteList();
|
||||
|
||||
void setDrawableState(U32 state, BOOL recursive = TRUE);
|
||||
void clearDrawableState(U32 state, BOOL recursive = TRUE);
|
||||
BOOL isDrawableState(U32 state, BOOL recursive = TRUE) const;
|
||||
|
|
@ -823,6 +825,9 @@ private:
|
|||
static BOOL sVelocityInterpolate;
|
||||
static BOOL sPingInterpolate;
|
||||
|
||||
bool mCachedOwnerInMuteList;
|
||||
F64 mCachedMuteListUpdateTime;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// For objects that are attachments
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "llvopartgroup.h"
|
||||
#include "llworld.h"
|
||||
#include "llmutelist.h"
|
||||
#include "pipeline.h"
|
||||
#include "llspatialpartition.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
|
@ -711,6 +712,11 @@ void LLViewerPartSim::updateSimulation()
|
|||
upd = FALSE;
|
||||
}
|
||||
|
||||
if(vobj && vobj->isOwnerInMuteList())
|
||||
{
|
||||
upd = FALSE;
|
||||
}
|
||||
|
||||
if (upd && vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
|
||||
{
|
||||
if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex())
|
||||
|
|
|
|||
Loading…
Reference in New Issue