diff options
| -rw-r--r-- | indra/newview/llvovolume.cpp | 14 | ||||
| -rw-r--r-- | indra/newview/llvovolume.h | 2 | 
2 files changed, 7 insertions, 9 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(); 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(); | 
