summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 444a26779a..3686ccb48f 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3121,10 +3121,9 @@ bool LLVOAvatar::isVisuallyMuted()
U32 max_cost = (U32) (max_render_cost*(LLVOAvatar::sLODFactor+0.5));
- muted = LLMuteList::getInstance()->isMuted(getID()) ||
- (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
- (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
- (mVisualComplexity > max_cost && max_render_cost > 0);
+ muted = (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
+ (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
+ (mVisualComplexity > max_cost && max_render_cost > 0);
// Could be part of the grand || collection above, but yanked out to make the logic visible
if (!muted)
@@ -3156,7 +3155,7 @@ bool LLVOAvatar::isVisuallyMuted()
}
}
- return muted;
+ return muted || isInMuteList();
}
void LLVOAvatar::forceUpdateVisualMuteSettings()
@@ -3165,6 +3164,24 @@ void LLVOAvatar::forceUpdateVisualMuteSettings()
mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() - 1.0;
}
+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;
+}
//------------------------------------------------------------------------
// updateCharacter()
@@ -8049,7 +8066,7 @@ void LLVOAvatar::updateImpostors()
BOOL LLVOAvatar::isImpostor()
{
- return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
+ return (sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD))) || isInMuteList() ? TRUE : FALSE;
}