summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2017-11-09 16:49:36 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2017-11-09 16:49:36 +0000
commit9d962be2a825bfbd47fcd0c200508c552c8aff78 (patch)
tree2c4d0aa7cb2eb9931365b0bb2999f48123df4695 /indra/newview/llviewerobject.cpp
parent5ec95b764632c76edef6e986a275153cc574012d (diff)
parent17c22d317f93abc61c68e05a36f56a0359f282ef (diff)
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>
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 5de4029542..e86d39e9d0 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -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;