From 68d85497adc328f8fda2fef52fb51f2c9bc7ece0 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 16 Oct 2008 12:57:29 +0000 Subject: * Releases the inter-region thread synchronization between physics in ODE on the same instance. * If you are hosting many regions on a single instance, you will probably notice a decrease in region startup time and maybe a slight increase in performance. * Single regions won't notice anything different --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 8 ++++---- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 2 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 2561fa5..9ad9318 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -147,7 +147,7 @@ namespace OpenSim.Region.Physics.OdePlugin } CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor))); - lock (OdeScene.OdeLock) + lock (_parent_scene.OdeLock) { AvatarGeomAndBodyCreation(pos.X, pos.Y, pos.Z, m_tensor); } @@ -362,7 +362,7 @@ namespace OpenSim.Region.Physics.OdePlugin get { return _position; } set { - lock (OdeScene.OdeLock) + lock (_parent_scene.OdeLock) { d.BodySetPosition(Body, value.X, value.Y, value.Z); _position = value; @@ -386,7 +386,7 @@ namespace OpenSim.Region.Physics.OdePlugin set { m_pidControllerActive = true; - lock (OdeScene.OdeLock) + lock (_parent_scene.OdeLock) { d.JointDestroy(Amotor); @@ -863,7 +863,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// public void Destroy() { - lock (OdeScene.OdeLock) + lock (_parent_scene.OdeLock) { // Kill the Amotor d.JointDestroy(Amotor); diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index a2c0c6b..452317a 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -990,7 +990,7 @@ namespace OpenSim.Region.Physics.OdePlugin } - lock (OdeScene.OdeLock) + lock (_parent_scene.OdeLock) { CreateGeom(m_targetSpace, _mesh); diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 2676def..90285c2 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -242,7 +242,7 @@ namespace OpenSim.Region.Physics.OdePlugin // split static geometry collision handling into spaces of 30 meters public IntPtr[,] staticPrimspace; - public static Object OdeLock = new Object(); + public Object OdeLock; public IMesher mesher; @@ -259,6 +259,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// public OdeScene(CollisionLocker dode) { + OdeLock = new Object(); ode = dode; nearCallback = near; triCallback = TriCallback; -- cgit v1.1