don't freeze with a sitted avatar in a border without other sim. Still messy :(

avinationmerge
UbitUmarov 2012-02-15 19:44:54 +00:00
parent a758abaa9f
commit b59275355e
2 changed files with 10 additions and 3 deletions

View File

@ -537,8 +537,15 @@ namespace OpenSim.Region.Framework.Scenes
return; return;
} }
} }
else if (RootPart.PhysActor != null)
{
RootPart.PhysActor.CrossingFailure();
}
val = AbsolutePosition; Vector3 oldp = AbsolutePosition;
val.X = Util.Clamp<float>(oldp.X, 0.5f, (float)Constants.RegionSize - 0.5f);
val.Y = Util.Clamp<float>(oldp.Y, 0.5f, (float)Constants.RegionSize - 0.5f);
val.Z = Util.Clamp<float>(oldp.Z, 0.5f, 4096.0f);
} }
} }

View File

@ -3125,7 +3125,7 @@ Console.WriteLine("ODEPrim JointCreateFixed !!!");
d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); d.BodySetPosition(Body, _position.X, _position.Y, _position.Z);
d.BodySetLinearVel(Body, 0, 0, 0); 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 { // tell base code only once
Interlocked.Increment(ref m_crossingfailures); Interlocked.Increment(ref m_crossingfailures);
base.RequestPhysicsterseUpdate(); base.RequestPhysicsterseUpdate();
@ -3133,7 +3133,7 @@ Console.WriteLine("ODEPrim JointCreateFixed !!!");
return; return;
} }
if (Interlocked.Exchange(ref m_crossingfailures, 0) > 1) if (Interlocked.Exchange(ref m_crossingfailures, 0) != 0)
{ {
// main simulator had a crossing failure // main simulator had a crossing failure
// park it inside region // park it inside region