diff options
author | Robert Adams | 2013-11-04 22:09:52 -0800 |
---|---|---|
committer | Robert Adams | 2013-11-04 22:09:52 -0800 |
commit | cd1a23fc142a12bb14ddb9d88d39e6acb41937b4 (patch) | |
tree | ddd50bb6c9f1b9cdde9bc52b3eb1612149055552 /OpenSim/Region/Framework | |
parent | varregion: remove unused terrain serialization code in SQLite and PGSQL modules (diff) | |
download | opensim-SC-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.zip opensim-SC-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.tar.gz opensim-SC-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.tar.bz2 opensim-SC-cd1a23fc142a12bb14ddb9d88d39e6acb41937b4.tar.xz |
varregion: remove uses of region size constant. In particular, update scene
to check for border crossings based on the size of the region.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a19f31f..64b3baf 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1033,7 +1033,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1033 | 1033 | ||
1034 | BordersLocked = true; | 1034 | BordersLocked = true; |
1035 | Border northBorder = new Border(); | 1035 | Border northBorder = new Border(); |
1036 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- | 1036 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (float)RegionInfo.RegionSizeY); //<--- |
1037 | northBorder.CrossDirection = Cardinals.N; | 1037 | northBorder.CrossDirection = Cardinals.N; |
1038 | NorthBorders.Add(northBorder); | 1038 | NorthBorders.Add(northBorder); |
1039 | 1039 | ||
@@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1043 | SouthBorders.Add(southBorder); | 1043 | SouthBorders.Add(southBorder); |
1044 | 1044 | ||
1045 | Border eastBorder = new Border(); | 1045 | Border eastBorder = new Border(); |
1046 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- | 1046 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (float)RegionInfo.RegionSizeY); //<--- |
1047 | eastBorder.CrossDirection = Cardinals.E; | 1047 | eastBorder.CrossDirection = Cardinals.E; |
1048 | EastBorders.Add(eastBorder); | 1048 | EastBorders.Add(eastBorder); |
1049 | 1049 | ||
@@ -3994,12 +3994,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3994 | { | 3994 | { |
3995 | if (posX < 0) | 3995 | if (posX < 0) |
3996 | posX = 0; | 3996 | posX = 0; |
3997 | else if (posX >= 256) | 3997 | else if (posX >= (float)RegionInfo.RegionSizeX) |
3998 | posX = 255.999f; | 3998 | posX = (float)RegionInfo.RegionSizeX - 0.001f; |
3999 | if (posY < 0) | 3999 | if (posY < 0) |
4000 | posY = 0; | 4000 | posY = 0; |
4001 | else if (posY >= 256) | 4001 | else if (posY >= (float)RegionInfo.RegionSizeY) |
4002 | posY = 255.999f; | 4002 | posY = (float)RegionInfo.RegionSizeY - 0.001f; |
4003 | 4003 | ||
4004 | reason = String.Empty; | 4004 | reason = String.Empty; |
4005 | if (Permissions.IsGod(agentID)) | 4005 | if (Permissions.IsGod(agentID)) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4b4e4ba..eed8908 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -842,9 +842,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
842 | maxX = -256f; | 842 | maxX = -256f; |
843 | maxY = -256f; | 843 | maxY = -256f; |
844 | maxZ = -256f; | 844 | maxZ = -256f; |
845 | minX = 256f; | 845 | minX = 10000f; |
846 | minY = 256f; | 846 | minY = 10000f; |
847 | minZ = 8192f; | 847 | minZ = 10000f; |
848 | 848 | ||
849 | SceneObjectPart[] parts = m_parts.GetArray(); | 849 | SceneObjectPart[] parts = m_parts.GetArray(); |
850 | for (int i = 0; i < parts.Length; i++) | 850 | for (int i = 0; i < parts.Length; i++) |