diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index fea2235175..9abeed8de7 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 { |