summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
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
{