summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-02-23 17:02:43 -0600
committerDave Parks <davep@lindenlab.com>2011-02-23 17:02:43 -0600
commit2d01424e25f0ecfddae753032fe18e451771476f (patch)
tree89c79e50dbf417837739a4ba36e386997a0ac7b1
parent74d402e59e4fd864d28fac52927c4e6900416c70 (diff)
SH-301 Use avatar distance and radius when calculating LoD for rigged attachments.
-rw-r--r--indra/newview/llvovolume.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 5c1d10ba7d..161cbe6aa9 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1204,9 +1204,20 @@ BOOL LLVOVolume::calcLOD()
S32 cur_detail = 0;
- F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
- F32 distance = mDrawable->mDistanceWRTCamera; //llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE);
- distance *= sDistanceFactor;
+ F32 radius;
+ F32 distance;
+
+ if (mDrawable->isState(LLDrawable::RIGGED))
+ {
+ LLVOAvatar* avatar = getAvatar();
+ distance = avatar->mDrawable->mDistanceWRTCamera;
+ radius = avatar->getBinRadius();
+ }
+ else
+ {
+ distance = mDrawable->mDistanceWRTCamera;
+ radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
+ }
F32 rampDist = LLVOVolume::sLODFactor * 2;