From e3d86e4599ee5944eaa2cfe0147d1a117495b2de Mon Sep 17 00:00:00 2001 From: Runitai Linden <davep@lindenlab.com> Date: Mon, 13 Dec 2021 13:14:41 -0600 Subject: SL-16487 Fix for broken bounding boxes on rigged meshes (still broken, but not more broken than release). --- indra/newview/llvovolume.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c1f83ed0ae..c312ebb307 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1754,10 +1754,9 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) if (rigged) { - min.set(-1, -1, -1, 0); - max.set(1, 1, 1, 0); - mDrawable->setSpatialExtents(min, max); + // always use the same octree node position for any given rigged mesh so it doesn't switch nodes + // while animating (and thus rebuild its vertex buffer) mDrawable->setPositionGroup(LLVector4a(0, 0, 0)); updateRadius(); mDrawable->movePartition(); @@ -4363,6 +4362,7 @@ void LLVOVolume::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) F32 LLVOVolume::getBinRadius() { + LL_PROFILE_ZONE_SCOPED; F32 radius; F32 scale = 1.f; -- cgit v1.2.3