diff options
| author | Oz Linden <oz@lindenlab.com> | 2018-03-09 09:08:02 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2018-03-09 09:08:02 -0500 |
| commit | aae241c43f66c3ef59cb076d00e42f9a857de354 (patch) | |
| tree | 82da2afc116915897a3207cc8eed120aef5ef3fd /indra/newview/llviewerobject.cpp | |
| parent | 17bb7f4fc5463e9426179b0ded810b51ef291c79 (diff) | |
| parent | f8c76535a35aaf245e261357a59e977bac5b2501 (diff) | |
merge changes for 5.1.2-release
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 6c2d4d7fea..5d49c888cf 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,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; |
