summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-07-04 19:55:54 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-07-04 19:55:54 +0300
commit60c0c0e0e4b504ae4e1a701265c1134220e7a8a1 (patch)
treef9d927283d79117ddbd806f32837d28e8d19725a /indra/newview/llvovolume.cpp
parentb3ae56b42796490676422a60f57cee22f6085b5a (diff)
MAINT-6259 rigged items' LOD should be size dependent, not only avatar dependent
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 8f0b233f01..55d65b8a09 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -86,6 +86,7 @@ BOOL gAnimateTextures = TRUE;
//extern BOOL gHideSelectedObjects;
F32 LLVOVolume::sLODFactor = 1.f;
+F32 LLVOVolume::sRiggedLODFactor = 2.f;
F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop
F32 LLVOVolume::sDistanceFactor = 1.0f;
S32 LLVOVolume::sNumLODChanges = 0;
@@ -1252,7 +1253,10 @@ BOOL LLVOVolume::calcLOD()
}
distance = avatar->mDrawable->mDistanceWRTCamera;
- radius = avatar->getBinRadius();
+ F32 avatar_radius = avatar->getBinRadius();
+ F32 object_radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length();
+ radius = object_radius * LLVOVolume::sRiggedLODFactor;
+ radius = llmin(radius, avatar_radius);
}
else
{