diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-20 19:24:31 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-20 19:24:31 -0400 |
commit | 66c40dd3debf240f88d87feda42e9a48a4ed0ce7 (patch) | |
tree | c21d455710c3445006497e1fc56dfacfe18e9275 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Merge branch 'master' of ssh://MyConnection/var/git/opensim (diff) | |
download | opensim-SC_OLD-66c40dd3debf240f88d87feda42e9a48a4ed0ce7.zip opensim-SC_OLD-66c40dd3debf240f88d87feda42e9a48a4ed0ce7.tar.gz opensim-SC_OLD-66c40dd3debf240f88d87feda42e9a48a4ed0ce7.tar.bz2 opensim-SC_OLD-66c40dd3debf240f88d87feda42e9a48a4ed0ce7.tar.xz |
* Switch border cross tests over to the new Border class.
* Use List<Border> for each cardinal to allow for irregular regions.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 |
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 |