From c2d7beb6173b32b48a3a0b4be47fec9997089329 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 17 Feb 2008 20:40:21 +0000 Subject: * Last bit of cleanup now. As long as you keep physical prim off, you should have a reasonably stable experience with ODE again. * Physical prim at the simulator edge still seems to have the occasional issue. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 312fd9c..50087a5 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1073,22 +1073,24 @@ namespace OpenSim.Region.Physics.OdePlugin } private void changevelocity(float timestep) { - while (ode.lockquery()) - { - } - ode.dlock(_parent_scene.world); - - System.Threading.Thread.Sleep(20); - if (IsPhysical) + lock (ode) { - if (Body != (IntPtr)0) + while (ode.lockquery()) { - d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); } - } + ode.dlock(_parent_scene.world); - ode.dunlock(_parent_scene.world); + System.Threading.Thread.Sleep(20); + if (IsPhysical) + { + if (Body != (IntPtr)0) + { + d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); + } + } + ode.dunlock(_parent_scene.world); + } //resetCollisionAccounting(); m_taintVelocity = PhysicsVector.Zero; } -- cgit v1.1