From cd1a23fc142a12bb14ddb9d88d39e6acb41937b4 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 4 Nov 2013 22:09:52 -0800 Subject: varregion: remove uses of region size constant. In particular, update scene to check for border crossings based on the size of the region. --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++++++------ OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Framework') 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 BordersLocked = true; Border northBorder = new Border(); - northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- + northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (float)RegionInfo.RegionSizeY); //<--- northBorder.CrossDirection = Cardinals.N; NorthBorders.Add(northBorder); @@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Framework.Scenes SouthBorders.Add(southBorder); Border eastBorder = new Border(); - eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- + eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (float)RegionInfo.RegionSizeY); //<--- eastBorder.CrossDirection = Cardinals.E; EastBorders.Add(eastBorder); @@ -3994,12 +3994,12 @@ namespace OpenSim.Region.Framework.Scenes { if (posX < 0) posX = 0; - else if (posX >= 256) - posX = 255.999f; + else if (posX >= (float)RegionInfo.RegionSizeX) + posX = (float)RegionInfo.RegionSizeX - 0.001f; if (posY < 0) posY = 0; - else if (posY >= 256) - posY = 255.999f; + else if (posY >= (float)RegionInfo.RegionSizeY) + posY = (float)RegionInfo.RegionSizeY - 0.001f; reason = String.Empty; 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 maxX = -256f; maxY = -256f; maxZ = -256f; - minX = 256f; - minY = 256f; - minZ = 8192f; + minX = 10000f; + minY = 10000f; + minZ = 10000f; SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) -- cgit v1.1