summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-14 20:06:32 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-14 20:06:32 +0100
commit1d6b24fcc219f504c13e771a220112a60c3a85e8 (patch)
treea7005f55e3215120efb5179bff79ec1589e4c8ef /indra/newview/llvoavatar.cpp
parentedf6795edaa4ec822ac0e2bc906c71606b84b5c8 (diff)
MAINT-8653 - enforce z-height offset for animated mesh objects
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 728155382f..8d9a063670 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1296,11 +1296,15 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
LL_RECORD_BLOCK_TIME(FTM_AVATAR_EXTENT_UPDATE);
S32 box_detail = gSavedSettings.getS32("AvatarBoundingBoxComplexity");
- LLVector4a buffer(0.1);
+
+ // AXON the update_min_max function used below assumes there is a
+ // known starting point, but in general there isn't. Ideally the
+ // box update logic should be modified to handle the no-point-yet
+ // case. For most models, starting with the pelvis is safe though.
LLVector4a pos;
pos.load3(mPelvisp->getWorldPosition().mV);
- newMin.setSub(pos, buffer);
- newMax.setAdd(pos, buffer);
+ newMin = pos;
+ newMax = pos;
//stretch bounding box by joint positions. No point doing this for
//control avs, where the polymeshes aren't maintained or
@@ -1429,8 +1433,9 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
//pad bounding box
- newMin.sub(buffer);
- newMax.add(buffer);
+ LLVector4a padding(0.1);
+ newMin.sub(padding);
+ newMax.add(padding);
}
void render_sphere_and_line(const LLVector3& begin_pos, const LLVector3& end_pos, F32 sphere_scale, const LLVector3& occ_color, const LLVector3& visible_color)