summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp33
1 files changed, 26 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a90fade3c9..75b81cdeed 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -721,7 +721,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
mLastUpdateRequestCOFVersion(-1),
- mLastUpdateReceivedCOFVersion(-1)
+ mLastUpdateReceivedCOFVersion(-1),
+ mCachedMuteListUpdateTime(0),
+ mCachedInMuteList(false)
{
//VTResume(); // VTune
setHoverOffset(LLVector3(0.0, 0.0, 0.0));
@@ -3133,10 +3135,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)
@@ -3168,7 +3169,7 @@ bool LLVOAvatar::isVisuallyMuted()
}
}
- return muted;
+ return muted || isInMuteList();
}
void LLVOAvatar::forceUpdateVisualMuteSettings()
@@ -3177,6 +3178,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;
+}
void LLVOAvatar::updateDebugText()
{
@@ -8139,7 +8158,7 @@ void LLVOAvatar::updateImpostors()
BOOL LLVOAvatar::isImpostor()
{
- return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
+ return (sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD))) || isInMuteList() ? TRUE : FALSE;
}