summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp55
1 files changed, 7 insertions, 48 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3c25339037..4de2f4684e 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2999,11 +2999,10 @@ bool LLVOAvatar::isVisuallyMuted()
if (!isSelf())
{
- static LLCachedControl<bool> render_mute_enabled(gSavedSettings, "RenderAutoMuteEnabled");
+ static LLCachedControl<F32> render_mute_threshold(gSavedSettings, "RenderAutoMuteThreshold");
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit");
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit");
static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderCostLimit");
- static LLCachedControl<U32> visibility_rank(gSavedSettings, "RenderAutoMuteVisibilityRank");
if (mVisuallyMuteSetting == ALWAYS_VISUAL_MUTE)
{ // Always want to see this AV as an imposter
@@ -3013,7 +3012,7 @@ bool LLVOAvatar::isVisuallyMuted()
{ // Never show as imposter
muted = false;
}
- else if (render_mute_enabled)
+ else if (LLVOAvatar::sLODFactor <= render_mute_threshold)
{
F64 now = LLFrameTimer::getTotalSeconds();
@@ -3034,13 +3033,14 @@ bool LLVOAvatar::isVisuallyMuted()
// Could be part of the grand || collection above, but yanked out to make the logic visible
if (!muted)
{
- if (visibility_rank > 0)
+ if (sMaxVisible > 0)
{ // They are above the visibilty rank - mute them
- muted = (mVisibilityRank > visibility_rank);
+ muted = (mVisibilityRank > sMaxVisible);
}
+ /* Not used - always draw friends or those in IMs. Works nicely, needs UI?
if (muted || // Don't mute friends or IMs
- visibility_rank == 0)
+ sMaxVisible == 0)
{
muted = !(LLAvatarTracker::instance().isBuddy(getID()));
if (muted)
@@ -3049,6 +3049,7 @@ bool LLVOAvatar::isVisuallyMuted()
muted = !gIMMgr->hasSession(session_id);
}
}
+ */
}
// Save visual mute state and set interval for updating
@@ -7879,8 +7880,6 @@ void LLVOAvatar::idleUpdateRenderCost()
calculateUpdateRenderCost(); // Update mVisualComplexity if needed
- doRenderCostNagging(max_render_cost); // Remind the user their AV is too complex
-
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME))
{
std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
@@ -7892,46 +7891,6 @@ void LLVOAvatar::idleUpdateRenderCost()
}
-// Remind the user about their expensive avatar
-void LLVOAvatar::doRenderCostNagging(U32 max_render_cost)
-{
- if (isSelf())
- {
- static S32 sOldComplexity = 0;
- static F64 sLastRenderCostNagTime = 0.0;
-
- const F64 RENDER_NAG_INTERVAL = 60.0;
-
- F64 now = LLFrameTimer::getTotalSeconds();
- if (sLastRenderCostNagTime > 0.0 &&
- (now - sLastRenderCostNagTime) > RENDER_NAG_INTERVAL &&
- sOldComplexity != mVisualComplexity)
- {
- sOldComplexity = mVisualComplexity;
-
- if (max_render_cost > 0)
- { //pop up notification that you have exceeded a render cost limit
- if (mVisualComplexity > max_render_cost+max_render_cost/2)
- {
- LLNotificationsUtil::add("ExceededHighDetailRenderCost");
- sLastRenderCostNagTime = now;
- }
- else if (mVisualComplexity > max_render_cost)
- {
- LLNotificationsUtil::add("ExceededMidDetailRenderCost");
- sLastRenderCostNagTime = now;
- }
- else if (mVisualComplexity > max_render_cost/2)
- {
- LLNotificationsUtil::add("ExceededLowDetailRenderCost");
- sLastRenderCostNagTime = now;
- }
- }
- }
- }
-}
-
-
// Calculations for mVisualComplexity value
void LLVOAvatar::calculateUpdateRenderCost()
{