summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-03-02 13:00:18 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-03-02 13:00:18 +0000
commit9f8c6ace4a72c6a44d062df15d78c123772a72c0 (patch)
tree500492208cabd8d896c19a88cf5bf7eddf66eeab /indra/newview/llviewerobject.cpp
parent28b95e4975f2333c0eb590b29740c3ce491a934d (diff)
parentf8c76535a35aaf245e261357a59e977bac5b2501 (diff)
merge
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index b0379bf9f7..531f9a9527 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -289,7 +289,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)
{
@@ -5344,6 +5346,30 @@ void LLViewerObject::updateText()
}
}
+bool LLViewerObject::isOwnerInMuteList(LLUUID id)
+{
+ LLUUID owner_id = id.isNull() ? mOwnerID : id;
+ if (isAvatar() || owner_id.isNull())
+ {
+ return false;
+ }
+ bool muted = false;
+ F64 now = LLFrameTimer::getTotalSeconds();
+ if (now < mCachedMuteListUpdateTime)
+ {
+ muted = mCachedOwnerInMuteList;
+ }
+ else
+ {
+ muted = LLMuteList::getInstance()->isMuted(owner_id);
+
+ const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1;
+ mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES;
+ mCachedOwnerInMuteList = muted;
+ }
+ return muted;
+}
+
LLVOAvatar* LLViewerObject::asAvatar()
{
return NULL;