From efd7ff31468755c7066c68fb6b5910f7b18aa3f0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 20 Mar 2012 16:46:16 +0000 Subject: add some more notifications about changes on physical parameters ( still incomple and there should be a better away ) --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 19 +++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 18069af..ccc3f32 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1521,7 +1521,11 @@ namespace OpenSim.Region.Framework.Scenes { SceneObjectPart part = GetSceneObjectPart(localID); if (part != null) + { part.UpdateExtraPhysics(PhysData); + if (part.UpdatePhysRequired) + remoteClient.SendPartPhysicsProprieties(part); + } } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9914c78..0ffd114 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1030,6 +1030,7 @@ namespace OpenSim.Region.Framework.Scenes } public UpdateRequired UpdateFlag { get; set; } + public bool UpdatePhysRequired { get; set; } /// /// Used for media on a prim. @@ -1410,6 +1411,7 @@ namespace OpenSim.Region.Framework.Scenes if(ParentGroup != null) ParentGroup.HasGroupChanged = true; ScheduleFullUpdateIfNone(); + UpdatePhysRequired = true; } } } @@ -1501,11 +1503,12 @@ namespace OpenSim.Region.Framework.Scenes m_physicsShapeType = DefaultPhysicsShapeType(); else m_physicsShapeType = value; - ScheduleFullUpdateIfNone(); } else m_physicsShapeType = DefaultPhysicsShapeType(); - ParentGroup.HasGroupChanged = true; + + if(m_physicsShapeType != value) + UpdatePhysRequired = true; } } @@ -1517,9 +1520,8 @@ namespace OpenSim.Region.Framework.Scenes if (value >=1 && value <= 22587.0) { m_density = value; - ScheduleFullUpdateIfNone(); + UpdatePhysRequired = true; } - ParentGroup.HasGroupChanged = true; } } @@ -1529,8 +1531,7 @@ namespace OpenSim.Region.Framework.Scenes set { if( value >= -1 && value <=28.0f) m_gravitymod = value; - ScheduleFullUpdateIfNone(); - ParentGroup.HasGroupChanged = true; + UpdatePhysRequired = true; } } @@ -1542,9 +1543,8 @@ namespace OpenSim.Region.Framework.Scenes if (value >= 0 && value <= 255.0f) { m_friction = value; - ScheduleFullUpdateIfNone(); + UpdatePhysRequired = true; } - ParentGroup.HasGroupChanged = true; } } @@ -1556,9 +1556,8 @@ namespace OpenSim.Region.Framework.Scenes if (value >= 0 && value <= 1.0f) { m_bounce = value; - ScheduleFullUpdateIfNone(); + UpdatePhysRequired = true; } - ParentGroup.HasGroupChanged = true; } } -- cgit v1.1