summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2022-07-01 14:52:31 -0700
committerCosmic Linden <cosmic@lindenlab.com>2022-07-01 15:18:30 -0700
commit65fb1c26f1266c68b1c6c663c49e25d9a5d62028 (patch)
treeec2536b7672766adafcb04ca1a3a157109ff38b8 /indra/newview/llvovolume.cpp
parent21d581ed389fe8a23967332b77e213403a51f908 (diff)
SL-17448: Be more thorough about generating bounding boxes that don't affect the octree
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp14
1 files changed, 6 insertions, 8 deletions
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();