From f10a824e47549806c1fa647c4e9fba4c8cf6ad13 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Oct 2011 20:58:59 +0100 Subject: Remove unnecessary lock of OdeLock in OdePrim.changeadd() This taint can only ever be processed from the OdeScene.Simulate() loop, which already locks OdeLock. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 31 ++++++++++++----------------- 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 1b9378a..3087f8d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1494,30 +1494,25 @@ Console.WriteLine("CreateGeom:"); // m_log.Debug(m_localID); } - lock (_parent_scene.OdeLock) - { #if SPAM Console.WriteLine("changeadd 1"); #endif - CreateGeom(m_targetSpace, mesh); - - if (prim_geom != IntPtr.Zero) - { - d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); - d.Quaternion myrot = new d.Quaternion(); - myrot.X = _orientation.X; - myrot.Y = _orientation.Y; - myrot.Z = _orientation.Z; - myrot.W = _orientation.W; - d.GeomSetQuaternion(prim_geom, ref myrot); - } + CreateGeom(m_targetSpace, mesh); - if (IsPhysical && Body == IntPtr.Zero) - { - enableBody(); - } + if (prim_geom != IntPtr.Zero) + { + d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); + d.Quaternion myrot = new d.Quaternion(); + myrot.X = _orientation.X; + myrot.Y = _orientation.Y; + myrot.Z = _orientation.Z; + myrot.W = _orientation.W; + d.GeomSetQuaternion(prim_geom, ref myrot); } + if (IsPhysical && Body == IntPtr.Zero) + enableBody(); + changeSelectedStatus(); m_taintadd = false; -- cgit v1.1