summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorRuslan Teliuk <ruslantproductengine@lindenlab.com>2016-07-15 18:29:12 +0300
committerRuslan Teliuk <ruslantproductengine@lindenlab.com>2016-07-15 18:29:12 +0300
commit62e7640ad5b0b183290e94b2950fd6288bd3d31c (patch)
tree2ff682b95b8520c1bf6d3e5f37512c59cd807f99 /indra/newview/llvovolume.cpp
parentbb4a958a00f73068fa6e531b3c38738db658d798 (diff)
parent60c0c0e0e4b504ae4e1a701265c1134220e7a8a1 (diff)
Merged lindenlab/viewer-neko into default
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 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
{