diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index d22f912d17..7e884d4091 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs @@ -445,7 +445,7 @@ namespace OpenSim.Region.PhysicsModule.ODE m_disabled = false; // The body doesn't already have a finite rotation mode set here - if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0.0f)) && _parent == null) + if ((!m_angularlock.ApproxEquals(Vector3.One, 0.0f)) && _parent == null) { createAMotor(m_angularlock); } @@ -919,7 +919,7 @@ namespace OpenSim.Region.PhysicsModule.ODE // _parent_scene.waitForSpaceUnlock(m_targetSpace); try { - SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null)); + SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, null, null, null)); } catch (AccessViolationException) { @@ -1121,7 +1121,7 @@ Console.WriteLine("ZProcessTaints for " + Name); { d.Mass m2; d.MassSetZero(out m2); - d.MassSetBoxTotal(out m2, prim.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z); + d.MassSetBoxTotal(out m2, prm.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z); d.Quaternion quat = new d.Quaternion(); quat.W = prm._orientation.W; @@ -1184,11 +1184,6 @@ Console.WriteLine("ZProcessTaints for " + Name); prm.m_collisionscore = 0; prm.m_disabled = false; - // The body doesn't already have a finite rotation mode set here - if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null) - { - prm.createAMotor(m_angularlock); - } prm.Body = Body; _parent_scene.ActivatePrim(prm); } @@ -1235,7 +1230,7 @@ Console.WriteLine("ZProcessTaints for " + Name); m_disabled = false; // The body doesn't already have a finite rotation mode set here - if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null) + if ((!m_angularlock.ApproxEquals(Vector3.One, 0f)) && _parent == null) { createAMotor(m_angularlock); } diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index f245a3b9a5..62988d0d5d 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs @@ -580,8 +580,8 @@ namespace OpenSim.Region.PhysicsModule.ODE m_suportCombine = false; nearCallback = near; - triCallback = TriCallback; - triArrayCallback = TriArrayCallback; +// triCallback = TriCallback; +// triArrayCallback = TriArrayCallback; m_rayCastManager = new ODERayCastRequestManager(this); // Create the world and the first space @@ -1811,10 +1811,10 @@ namespace OpenSim.Region.PhysicsModule.ODE //} // } } - +/* private int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount) { - /* String name1 = null; + String name1 = null; String name2 = null; if (!geom_name_map.TryGetValue(trimesh, out name1)) @@ -1827,7 +1827,7 @@ namespace OpenSim.Region.PhysicsModule.ODE } m_log.InfoFormat("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); - */ + return 1; } @@ -1857,7 +1857,7 @@ namespace OpenSim.Region.PhysicsModule.ODE return 1; } - +*/ /// /// This is our collision testing routine in ODE /// @@ -1988,8 +1988,8 @@ namespace OpenSim.Region.PhysicsModule.ODE x = x - offsetX + 1f; y = y - offsetY + 1f; - // map is rotated + // map is rotated index = (int)x * ((int)m_regionHeight + 3) + (int)y; if (index < TerrainHeightFieldHeights[heightFieldGeom].Length)