From 4119e60c0ce56ea1dab6d797b3c9f2a91d3d3f9e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 7 Jul 2016 00:16:25 +0100 Subject: [PATCH] avoid InvalidBoundsRadius() calls caused by small changes --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3d6a4c8918..d7e2c46cd4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -867,7 +867,8 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup != null && !ParentGroup.IsDeleted) { - ParentGroup.InvalidBoundsRadius(); + if((oldpos - m_offsetPosition).LengthSquared() > 1.0f) + ParentGroup.InvalidBoundsRadius(); PhysicsActor actor = PhysActor; if (ParentID != 0 && actor != null) @@ -1165,9 +1166,9 @@ namespace OpenSim.Region.Framework.Scenes { if (m_shape != null) { - + Vector3 oldscale = m_shape.Scale; m_shape.Scale = value; - if (ParentGroup != null) + if (ParentGroup != null && ((value - oldscale).LengthSquared() >1.0f)) ParentGroup.InvalidBoundsRadius(); PhysicsActor actor = PhysActor; if (actor != null)