From f32de6fe885915b11fd349c0d8f3e6a98d4dd2bf Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 2 Sep 2009 03:33:31 +0100 Subject: Thank you, dslake, for a set of patches to improve OpenSim startup and idle performance. --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++-- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 33afc40..ec209ed 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -998,7 +998,7 @@ namespace OpenSim.Region.Framework.Scenes physicsMS2 = Environment.TickCount - physicsMS2; if (m_frame % m_update_entitymovement == 0) - m_sceneGraph.UpdateEntityMovement(); + m_sceneGraph.UpdateScenePresenceMovement(); physicsMS = Environment.TickCount; if ((m_frame % m_update_physics == 0) && m_physics_enabled) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 3007598..48dea07 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -198,9 +198,9 @@ namespace OpenSim.Region.Framework.Scenes } } - protected internal void UpdateEntityMovement() + protected internal void UpdateScenePresenceMovement() { - List moveEntities = GetEntities(); + List moveEntities = GetScenePresences(); foreach (EntityBase entity in moveEntities) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index d72ed7d..5be074e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1904,7 +1904,7 @@ namespace OpenSim.Region.Framework.Scenes //return; //} - if (Util.DistanceLessThan(lastPhysGroupPos, AbsolutePosition, 0.02) && UsePhysics) + if (UsePhysics && Util.DistanceLessThan(lastPhysGroupPos, AbsolutePosition, 0.02)) { m_rootPart.UpdateFlag = 1; lastPhysGroupPos = AbsolutePosition; @@ -1916,11 +1916,10 @@ namespace OpenSim.Region.Framework.Scenes checkAtTargets(); - if (((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) + if (UsePhysics && ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) - || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)) - && UsePhysics) + || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))) { m_rootPart.UpdateFlag = 1; -- cgit v1.1