summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorBrett Joseph <bjoseph@vivox.com>2015-05-11 09:52:18 -0400
committerBrett Joseph <bjoseph@vivox.com>2015-05-11 09:52:18 -0400
commit43b7fe66db159faaa84d545f97818e7a6f0f6920 (patch)
tree6581ed36e716f6aa57b01f2861d6812294fb2261 /indra/newview/llvoavatar.cpp
parent7cc3e9b3cf8d70fce2ba0d4a398824e599fc8c5d (diff)
parente611e35e033e99f619b0e4938f6879c8e387efd5 (diff)
Merged lindenlab/viewer-tools-update into default
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 1b905713b3..6e0d77b10a 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -710,7 +710,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));
@@ -3122,10 +3124,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)
@@ -3157,7 +3158,7 @@ bool LLVOAvatar::isVisuallyMuted()
}
}
- return muted;
+ return muted || isInMuteList();
}
void LLVOAvatar::forceUpdateVisualMuteSettings()
@@ -3166,6 +3167,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()
{
@@ -8128,7 +8147,7 @@ void LLVOAvatar::updateImpostors()
BOOL LLVOAvatar::isImpostor()
{
- return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
+ return (sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD))) || isInMuteList() ? TRUE : FALSE;
}