summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-11-09 16:09:51 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-11-09 16:09:51 +0200
commit17c22d317f93abc61c68e05a36f56a0359f282ef (patch)
tree4853f0cfc982ddc8a3844e26b313fd6e5e7ee3f6 /indra/newview/llviewerobject.cpp
parenta4c3f5aaaec6a190381bfe31ceec97ed31e010f1 (diff)
MAINT-2880 Particle generator object doesn't start displaying particles, when unblocking the owner of this object
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;