aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs26
2 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 214b07a..0c34c90 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -36,6 +36,7 @@ using OpenSim.Region.Framework.Scenes;
36namespace OpenSim.Region.Framework.Interfaces 36namespace OpenSim.Region.Framework.Interfaces
37{ 37{
38 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version); 38 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version);
39 public delegate ScenePresence CrossAsyncDelegate(ScenePresence agent, bool isFlying);
39 40
40 public interface IEntityTransferModule 41 public interface IEntityTransferModule
41 { 42 {
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
3980 3980
3981 } 3981 }
3982 3982
3983 public void CrossToNewRegionFail()
3984 {
3985 if (m_requestedSitTargetUUID == UUID.Zero)
3986 {
3987 bool isFlying = Flying;
3988 RemoveFromPhysicalScene();
3989
3990 Vector3 pos = AbsolutePosition;
3991 if (AbsolutePosition.X < 0)
3992 pos.X += Velocity.X * 2;
3993 else if (AbsolutePosition.X > Constants.RegionSize)
3994 pos.X -= Velocity.X * 2;
3995 if (AbsolutePosition.Y < 0)
3996 pos.Y += Velocity.Y * 2;
3997 else if (AbsolutePosition.Y > Constants.RegionSize)
3998 pos.Y -= Velocity.Y * 2;
3999 Velocity = Vector3.Zero;
4000 AbsolutePosition = pos;
4001
4002 AddToPhysicalScene(isFlying);
4003 }
4004
4005 }
4006
3983 /// <summary> 4007 /// <summary>
3984 /// Moves the agent outside the region bounds 4008 /// Moves the agent outside the region bounds
3985 /// Tells neighbor region that we're crossing to it 4009 /// Tells neighbor region that we're crossing to it
@@ -3996,7 +4020,7 @@ namespace OpenSim.Region.Framework.Scenes
3996 } 4020 }
3997 catch 4021 catch
3998 { 4022 {
3999 result = m_scene.CrossAgentToNewRegion(this, false); 4023// result = m_scene.CrossAgentToNewRegion(this, false);
4000 } 4024 }
4001 // if(!result) 4025 // if(!result)
4002 // parcelRegionCross(true); 4026 // parcelRegionCross(true);