From 59413adceecd7f6c9132f03b436b7a0b5cabb443 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 21 Oct 2014 11:57:47 +0100 Subject: do agent crossing async, including QUERYACCESS ( need to check vehicles for this also ), so it doesn't stop heartbeat --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 26 +++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 754dd96..b746e3a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3980,6 +3980,30 @@ namespace OpenSim.Region.Framework.Scenes } + public void CrossToNewRegionFail() + { + if (m_requestedSitTargetUUID == UUID.Zero) + { + bool isFlying = Flying; + RemoveFromPhysicalScene(); + + Vector3 pos = AbsolutePosition; + if (AbsolutePosition.X < 0) + pos.X += Velocity.X * 2; + else if (AbsolutePosition.X > Constants.RegionSize) + pos.X -= Velocity.X * 2; + if (AbsolutePosition.Y < 0) + pos.Y += Velocity.Y * 2; + else if (AbsolutePosition.Y > Constants.RegionSize) + pos.Y -= Velocity.Y * 2; + Velocity = Vector3.Zero; + AbsolutePosition = pos; + + AddToPhysicalScene(isFlying); + } + + } + /// /// Moves the agent outside the region bounds /// Tells neighbor region that we're crossing to it @@ -3996,7 +4020,7 @@ namespace OpenSim.Region.Framework.Scenes } catch { - result = m_scene.CrossAgentToNewRegion(this, false); +// result = m_scene.CrossAgentToNewRegion(this, false); } // if(!result) // parcelRegionCross(true); -- cgit v1.1