diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 2561fa5c80..9ad9318dbc 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 a2c0c6b5ae..452317ae79 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 2676def5e5..90285c2819 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;