From abcddc97cf01fb61bc4b77ab492c02e3985bb1e1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 13 Jun 2018 19:39:10 +0100 Subject: SL-915, MAINT-8554 - WIP on managing dynamic avatar bounding box, using to constrain encroachment by animated objects --- indra/newview/llvoavatar.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7a138b26a4..6896632597 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1296,14 +1296,16 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) LL_RECORD_BLOCK_TIME(FTM_AVATAR_EXTENT_UPDATE); S32 box_detail = gSavedSettings.getS32("AvatarBoundingBoxComplexity"); - LLVector4a buffer(0.0); + LLVector4a buffer(0.1); LLVector4a pos; - pos.load3(getRenderPosition().mV); + pos.load3(mPelvisp->getWorldPosition().mV); newMin.setSub(pos, buffer); newMax.setAdd(pos, buffer); - //stretch bounding box by joint positions - if (box_detail>=1) + //stretch bounding box by joint positions. No point doing this for + //control avs, where the polymeshes aren't maintained or + //displayed. + if (box_detail>=1 && !isControlAvatar()) { for (polymesh_map_t::iterator i = mPolyMeshes.begin(); i != mPolyMeshes.end(); ++i) { @@ -1316,6 +1318,7 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) } } + // AXON shouldn't this section be after all the detail levels? LLVector4a center, size; center.setAdd(newMin, newMax); center.mul(0.5f); -- cgit v1.3