diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 8a8a5fbc85..3adf773268 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -696,45 +696,51 @@ namespace OpenSim.Region.Physics.OdePlugin public void ProcessTaints(float timestep) { - + if (m_taintadd) { changeadd(timestep); } + if (prim_geom != (IntPtr)0) + { + if (m_taintposition != _position) + Move(timestep); - if (m_taintposition != _position) - Move(timestep); + if (m_taintrot != _orientation) + rotate(timestep); + // - if (m_taintrot != _orientation) - rotate(timestep); - // + if (m_taintPhysics != m_isphysical) + changePhysicsStatus(timestep); + // - if (m_taintPhysics != m_isphysical) - changePhysicsStatus(timestep); - // + if (m_taintsize != _size) + changesize(timestep); + // - if (m_taintsize != _size) - changesize(timestep); - // + if (m_taintshape) + changeshape(timestep); + // - if (m_taintshape) - changeshape(timestep); - // + if (m_taintforce) + changeAddForce(timestep); - if (m_taintforce) - changeAddForce(timestep); + if (m_taintdisable) + changedisable(timestep); - if (m_taintdisable) - changedisable(timestep); + if (m_taintselected != m_isSelected) + changeSelectedStatus(timestep); - if (m_taintselected != m_isSelected) - changeSelectedStatus(timestep); + if (m_taintVelocity != PhysicsVector.Zero) + changevelocity(timestep); - if (m_taintVelocity != PhysicsVector.Zero) - changevelocity(timestep); - - if (m_taintparent != _parent) - changelink(timestep); + if (m_taintparent != _parent) + changelink(timestep); + } + else + { + m_log.Error("[PHYISCS]: The scene reused a disposed PhysActor! *waves finger*, Don't be evil."); + } } private void changelink(float timestep) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 5b1fd7842c..fc71802ae4 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -238,7 +238,8 @@ namespace OpenSim.Region.Physics.OdePlugin internal void waitForSpaceUnlock(IntPtr space) { - while (d.SpaceLockQuery(space)){ } // Wait and do nothing + if (space != (IntPtr)0) + while (d.SpaceLockQuery(space)){ } // Wait and do nothing } /// @@ -1014,6 +1015,11 @@ namespace OpenSim.Region.Physics.OdePlugin System.Threading.Thread.Sleep(20); if (currentspace != space) { + m_log.Info("[SPACE]: C:" + currentspace.ToString() + " g:" + geom.ToString()); + if (currentspace == (IntPtr) 0) + { + int adfadf = 0; + } if (d.SpaceQuery(currentspace, geom) && currentspace != (IntPtr) 0) { if (d.GeomIsSpace(currentspace))