From 3bffdddc9d0f0f62d7cf4bc6c271a865052ee119 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 15 Feb 2012 19:44:54 +0000 Subject: don't freeze with a sitted avatar in a border without other sim. Still messy :( --- OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs index 95a9741..073241f 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs @@ -3125,7 +3125,7 @@ Console.WriteLine("ODEPrim JointCreateFixed !!!"); d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); d.BodySetLinearVel(Body, 0, 0, 0); - if (Interlocked.Exchange(ref m_crossingfailures, 0) == 0) + if (Interlocked.Exchange(ref m_crossingfailures, m_crossingfailures) == 0) { // tell base code only once Interlocked.Increment(ref m_crossingfailures); base.RequestPhysicsterseUpdate(); @@ -3133,7 +3133,7 @@ Console.WriteLine("ODEPrim JointCreateFixed !!!"); return; } - if (Interlocked.Exchange(ref m_crossingfailures, 0) > 1) + if (Interlocked.Exchange(ref m_crossingfailures, 0) != 0) { // main simulator had a crossing failure // park it inside region -- cgit v1.1