From 65fb1c26f1266c68b1c6c663c49e25d9a5d62028 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Fri, 1 Jul 2022 14:52:31 -0700 Subject: SL-17448: Be more thorough about generating bounding boxes that don't affect the octree --- indra/newview/llvovolume.cpp | 14 ++++++-------- indra/newview/llvovolume.h | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 074ad35af4..d86e135116 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1682,7 +1682,7 @@ void LLVOVolume::regenFaces() } } -BOOL LLVOVolume::genBBoxes(BOOL force_global) +BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds) { LL_PROFILE_ZONE_SCOPED; BOOL res = TRUE; @@ -1760,7 +1760,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) if (any_valid_boxes) { - if (rebuild) + if (rebuild && should_update_octree_bounds) { //get the Avatar associated with this object if it's rigged LLVOAvatar* avatar = nullptr; @@ -2066,12 +2066,10 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) // All it did was move or we changed the texture coordinate offset } - if (should_update_octree_bounds || !mDrawable->getSpatialExtents()->isFinite3()) - { - // Generate bounding boxes if needed, and update the object's size in the - // octree - genBBoxes(FALSE); - } + should_update_octree_bounds = should_update_octree_bounds || !mDrawable->getSpatialExtents()->isFinite3(); + // Generate bounding boxes if needed, and update the object's size in the + // octree + genBBoxes(FALSE, should_update_octree_bounds); // Update face flags updateFaceFlags(); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 8009c92702..ce6c155883 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -233,7 +233,7 @@ public: void updateFaceFlags(); void regenFaces(); - BOOL genBBoxes(BOOL force_global); + BOOL genBBoxes(BOOL force_global, BOOL should_update_octree_bounds = FALSE); void preRebuild(); virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max); virtual F32 getBinRadius(); -- cgit v1.2.3