summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b3129a85cd..c3cc5a5fae 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -712,7 +712,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
mLastUpdateRequestCOFVersion(-1),
- mLastUpdateReceivedCOFVersion(-1)
+ mLastUpdateReceivedCOFVersion(-1),
+ mCachedMuteListUpdateTime(0),
+ mCachedInMuteList(false)
{
LL_DEBUGS("AvatarRender") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL;
@@ -3082,6 +3084,24 @@ bool LLVOAvatar::isVisuallyMuted() const
return ( mVisuallyMuteSetting == ALWAYS_VISUAL_MUTE );
}
+bool LLVOAvatar::isInMuteList()
+{
+ bool muted = false;
+ F64 now = LLFrameTimer::getTotalSeconds();
+ if (now < mCachedMuteListUpdateTime)
+ {
+ muted = mCachedInMuteList;
+ }
+ else
+ {
+ muted = LLMuteList::getInstance()->isMuted(getID());
+
+ const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1;
+ mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES;
+ mCachedInMuteList = muted;
+ }
+ return muted;
+}
void LLVOAvatar::updateDebugText()
{
// clear debug text