summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-07-31 21:57:42 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-07-31 21:57:42 +0100
commit447aadc37b56190893bbd4e2f527a4683844024b (patch)
tree34e94c508334b8243a1edce1759f7df95a172d14 /indra/newview/llvovolume.cpp
parent91dfd7e06c8e1e5499ffd4137053b4b238b7eb45 (diff)
SL-937 - use dynamic box for rigged mesh attached to normal avatar as well. Still has a 2x error in the radius calc, but gets radius using the dynamic box.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 61d82ec1cf..01b70088ab 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1296,6 +1296,8 @@ BOOL LLVOVolume::calcLOD()
}
distance = avatar->mDrawable->mDistanceWRTCamera;
+
+
if (avatar->isControlAvatar())
{
// MAINT-7926 Handle volumes in an animated object as a special case
@@ -1306,8 +1308,16 @@ BOOL LLVOVolume::calcLOD()
}
else
{
+ // Volume in a rigged mesh attached to a regular avatar.
+#if 0
// Note this isn't really a radius, so distance calcs are off by factor of 2
radius = avatar->getBinRadius();
+#else
+ // SL-937: add dynamic box handling for rigged mesh on regular avatars.
+ const LLVector3* box = avatar->getLastAnimExtents();
+ LLVector3 diag = box[1] - box[0];
+ radius = diag.magVec(); // preserve old BinRadius behavior - 2x off
+#endif
}
if (distance <= 0.f || radius <= 0.f)
{