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.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5281c4f..aae1823 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2830,27 +2830,28 @@ namespace OpenSim.Region.Framework.Scenes
2830 if (!IsInTransit) 2830 if (!IsInTransit)
2831 { 2831 {
2832 // Checks if where it's headed exists a region 2832 // Checks if where it's headed exists a region
2833 if (pos2.X < 0) 2833
2834 if (m_scene.TestBorderCross(pos2, Cardinals.W))
2834 { 2835 {
2835 if (pos2.Y < 0) 2836 if (m_scene.TestBorderCross(pos2, Cardinals.S))
2836 neighbor = HaveNeighbor(Cardinals.SW, ref fix); 2837 neighbor = HaveNeighbor(Cardinals.SW, ref fix);
2837 else if (pos2.Y > Constants.RegionSize) 2838 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
2838 neighbor = HaveNeighbor(Cardinals.NW, ref fix); 2839 neighbor = HaveNeighbor(Cardinals.NW, ref fix);
2839 else 2840 else
2840 neighbor = HaveNeighbor(Cardinals.W, ref fix); 2841 neighbor = HaveNeighbor(Cardinals.W, ref fix);
2841 } 2842 }
2842 else if (pos2.X > Constants.RegionSize) 2843 else if (m_scene.TestBorderCross(pos2, Cardinals.E))
2843 { 2844 {
2844 if (pos2.Y < 0) 2845 if (m_scene.TestBorderCross(pos2, Cardinals.S))
2845 neighbor = HaveNeighbor(Cardinals.SE, ref fix); 2846 neighbor = HaveNeighbor(Cardinals.SE, ref fix);
2846 else if (pos2.Y > Constants.RegionSize) 2847 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
2847 neighbor = HaveNeighbor(Cardinals.NE, ref fix); 2848 neighbor = HaveNeighbor(Cardinals.NE, ref fix);
2848 else 2849 else
2849 neighbor = HaveNeighbor(Cardinals.E, ref fix); 2850 neighbor = HaveNeighbor(Cardinals.E, ref fix);
2850 } 2851 }
2851 else if (pos2.Y < 0) 2852 else if (m_scene.TestBorderCross(pos2, Cardinals.S))
2852 neighbor = HaveNeighbor(Cardinals.S, ref fix); 2853 neighbor = HaveNeighbor(Cardinals.S, ref fix);
2853 else if (pos2.Y > Constants.RegionSize) 2854 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
2854 neighbor = HaveNeighbor(Cardinals.N, ref fix); 2855 neighbor = HaveNeighbor(Cardinals.N, ref fix);
2855 2856
2856 // Makes sure avatar does not end up outside region 2857 // Makes sure avatar does not end up outside region