diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 3cd43678912768f955c7b4a135e3dec87837d72b..b64034b9450278c92996d07f5098f35d0143879c 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -722,13 +722,17 @@ void LLVolumeImplFlexible::preRebuild() if (!mUpdated) { LL_RECORD_BLOCK_TIME(FTM_FLEXI_PREBUILD); - doFlexibleRebuild(); + doFlexibleRebuild(false); } } -void LLVolumeImplFlexible::doFlexibleRebuild() +void LLVolumeImplFlexible::doFlexibleRebuild(bool rebuild_volume) { LLVolume* volume = mVO->getVolume(); + if(rebuild_volume) + { + volume->setDirty(); + } volume->regen(); mUpdated = TRUE; @@ -801,7 +805,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) volume->dirtySpatialGroup(); { LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_REBUILD); - doFlexibleRebuild(); + doFlexibleRebuild(volume->mVolumeChanged); } volume->genBBoxes(isVolumeGlobal()); } diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h index beb281a90626e1e194a13a5bf1e3b9555b0fce1a..a00551df8e10b5357f79a89f19ac7de52a026af0 100755 --- a/indra/newview/llflexibleobject.h +++ b/indra/newview/llflexibleobject.h @@ -100,7 +100,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const; void updateRelativeXform(bool force_identity); void doFlexibleUpdate(); // Called to update the simulation - void doFlexibleRebuild(); // Called to rebuild the geometry + void doFlexibleRebuild(bool rebuild_volume); // Called to rebuild the geometry void preRebuild(); //void setAttributes( LLFlexibleObjectData );