diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-05-22 21:09:07 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-05-22 21:09:07 +0100 |
commit | 806fd24704b69e5e51dae108952937cc05840f6c (patch) | |
tree | 2047cbf2ad5364b5e803c06b2702216023d2d17d /indra/newview/llvoavatar.cpp | |
parent | 8528a9ae131dff09865eccd672efce621571c5e5 (diff) | |
parent | 48af8529a80052e9bc42f81f36896739f8aff861 (diff) |
merge
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6cb0f84f0c..80c6805ead 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -119,7 +119,7 @@ const F32 MAX_HOVER_Z = 2.0; const F32 MIN_HOVER_Z = -2.0; const F32 MIN_ATTACHMENT_COMPLEXITY = 0.f; -const F32 MAX_ATTACHMENT_COMPLEXITY = 1.0e6f; +const F32 DEFAULT_MAX_ATTACHMENT_COMPLEXITY = 1.0e6f; using namespace LLAvatarAppearanceDefines; @@ -9018,6 +9018,9 @@ void LLVOAvatar::calculateUpdateRenderComplexity() * the official viewer for consideration. *****************************************************************/ static const U32 COMPLEXITY_BODY_PART_COST = 200; + static LLCachedControl<F32> max_complexity_setting(gSavedSettings,"MaxAttachmentComplexity"); + F32 max_attachment_complexity = max_complexity_setting; + max_attachment_complexity = llmax(max_attachment_complexity, DEFAULT_MAX_ATTACHMENT_COMPLEXITY); // Diagnostic list of all textures on our avatar static std::set<LLUUID> all_textures; @@ -9099,7 +9102,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() << " children: " << attachment_children_cost << LL_ENDL; // Limit attachment complexity to avoid signed integer flipping of the wearer's ACI - cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY); + cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, max_attachment_complexity); } } } |