From cb6ec3d0f7a805c44a10aa7ecefae6f38b92ff64 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 14 Nov 2007 16:12:59 +0000 Subject: * Removes the console enumeration errors on sim start. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 30 ++++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 472a10b..808f7c2 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -405,7 +405,10 @@ namespace OpenSim.Region.Physics.OdePlugin { lock (OdeLock) { - _activeprims.Remove(deactivatePrim); + lock (_activeprims) + { + _activeprims.Remove(deactivatePrim); + } } } public int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount) @@ -1174,7 +1177,12 @@ namespace OpenSim.Region.Physics.OdePlugin _mesh = mesh; _pbs = pbs; _parent_scene = parent_scene; + + if (pos.Z < 0) + m_isphysical = false; + else m_isphysical = pisPhysical; + m_primName = primName; @@ -1581,19 +1589,21 @@ namespace OpenSim.Region.Physics.OdePlugin // Sim resources and memory. // Disables the prim's movement physics.... // It's a hack and will generate a console message if it fails. - - try + lock (OdeScene.OdeLock) { - disableBody(); + try + { + disableBody(); - } - catch (System.Exception e) - { - if (Body != (IntPtr)0) + } + catch (System.Exception e) { - d.BodyDestroy(Body); - Body = (IntPtr)0; + if (Body != (IntPtr)0) + { + d.BodyDestroy(Body); + Body = (IntPtr)0; + } } } -- cgit v1.1