aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs22
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index ff97183..aae1823 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -222,10 +222,7 @@ namespace OpenSim.Region.Framework.Scenes
222 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG 222 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG
223 } 223 }
224 224
225 protected enum Cardinals 225
226 {
227 N=1,NE,E,SE,S,SW,W,NW
228 }
229 /// <summary> 226 /// <summary>
230 /// Position at which a significant movement was made 227 /// Position at which a significant movement was made
231 /// </summary> 228 /// </summary>
@@ -2833,27 +2830,28 @@ namespace OpenSim.Region.Framework.Scenes
2833 if (!IsInTransit) 2830 if (!IsInTransit)
2834 { 2831 {
2835 // Checks if where it's headed exists a region 2832 // Checks if where it's headed exists a region
2836 if (pos2.X < 0) 2833
2834 if (m_scene.TestBorderCross(pos2, Cardinals.W))
2837 { 2835 {
2838 if (pos2.Y < 0) 2836 if (m_scene.TestBorderCross(pos2, Cardinals.S))
2839 neighbor = HaveNeighbor(Cardinals.SW, ref fix); 2837 neighbor = HaveNeighbor(Cardinals.SW, ref fix);
2840 else if (pos2.Y > Constants.RegionSize) 2838 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
2841 neighbor = HaveNeighbor(Cardinals.NW, ref fix); 2839 neighbor = HaveNeighbor(Cardinals.NW, ref fix);
2842 else 2840 else
2843 neighbor = HaveNeighbor(Cardinals.W, ref fix); 2841 neighbor = HaveNeighbor(Cardinals.W, ref fix);
2844 } 2842 }
2845 else if (pos2.X > Constants.RegionSize) 2843 else if (m_scene.TestBorderCross(pos2, Cardinals.E))
2846 { 2844 {
2847 if (pos2.Y < 0) 2845 if (m_scene.TestBorderCross(pos2, Cardinals.S))
2848 neighbor = HaveNeighbor(Cardinals.SE, ref fix); 2846 neighbor = HaveNeighbor(Cardinals.SE, ref fix);
2849 else if (pos2.Y > Constants.RegionSize) 2847 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
2850 neighbor = HaveNeighbor(Cardinals.NE, ref fix); 2848 neighbor = HaveNeighbor(Cardinals.NE, ref fix);
2851 else 2849 else
2852 neighbor = HaveNeighbor(Cardinals.E, ref fix); 2850 neighbor = HaveNeighbor(Cardinals.E, ref fix);
2853 } 2851 }
2854 else if (pos2.Y < 0) 2852 else if (m_scene.TestBorderCross(pos2, Cardinals.S))
2855 neighbor = HaveNeighbor(Cardinals.S, ref fix); 2853 neighbor = HaveNeighbor(Cardinals.S, ref fix);
2856 else if (pos2.Y > Constants.RegionSize) 2854 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
2857 neighbor = HaveNeighbor(Cardinals.N, ref fix); 2855 neighbor = HaveNeighbor(Cardinals.N, ref fix);
2858 2856
2859 // Makes sure avatar does not end up outside region 2857 // Makes sure avatar does not end up outside region