From 13a9a4b653c5470e6a450bfd9b2049273a4ef7b2 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 14 Dec 2013 07:53:01 -0800 Subject: varregion: rename 'LegacyRegionLocX' back to 'RegionLocX' and same for Y and Z. Rename 'RegionWorldLocX' to 'WorldLocX' and same for Y and Z. This keeps the downward compatibility and follows the scheme of 'region' and 'world' location naming that is happening in the Util module. --- OpenSim/Region/Framework/Scenes/Scene.cs | 20 ++++++++++---------- OpenSim/Region/Framework/Scenes/SceneManager.cs | 4 ++-- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 +++--- OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index be8aed1..3a5aa0f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1110,8 +1110,8 @@ namespace OpenSim.Region.Framework.Scenes if (RegionInfo.RegionHandle != otherRegion.RegionHandle) { // If these are cast to INT because long + negative values + abs returns invalid data - int resultX = Math.Abs((int)xcell - (int)RegionInfo.LegacyRegionLocX); - int resultY = Math.Abs((int)ycell - (int)RegionInfo.LegacyRegionLocY); + int resultX = Math.Abs((int)xcell - (int)RegionInfo.RegionLocX); + int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY); if (resultX <= 1 && resultY <= 1) { // Let the grid service module know, so this can be cached @@ -1186,8 +1186,8 @@ namespace OpenSim.Region.Framework.Scenes /// public int HaveNeighbor(Cardinals car, ref int[] fix) { - uint neighbourx = RegionInfo.LegacyRegionLocX; - uint neighboury = RegionInfo.LegacyRegionLocY; + uint neighbourx = RegionInfo.RegionLocX; + uint neighboury = RegionInfo.RegionLocY; int dir = (int)car; @@ -1209,8 +1209,8 @@ namespace OpenSim.Region.Framework.Scenes if (neighbourRegion == null) { - fix[0] = (int)(RegionInfo.LegacyRegionLocX - neighbourx); - fix[1] = (int)(RegionInfo.LegacyRegionLocY - neighboury); + fix[0] = (int)(RegionInfo.RegionLocX - neighbourx); + fix[1] = (int)(RegionInfo.RegionLocY - neighboury); return dir * (-1); } else @@ -4393,8 +4393,8 @@ namespace OpenSim.Region.Framework.Scenes { uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); - uint tRegionX = RegionInfo.LegacyRegionLocX; - uint tRegionY = RegionInfo.LegacyRegionLocY; + uint tRegionX = RegionInfo.RegionLocX; + uint tRegionY = RegionInfo.RegionLocY; //Send Data to ScenePresence childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); // Not Implemented: @@ -4636,8 +4636,8 @@ namespace OpenSim.Region.Framework.Scenes uint regionX, regionY; Util.RegionHandleToWorldLoc(regionHandle, out regionX, out regionY); - int shiftx = (int) regionX - (int)RegionInfo.RegionWorldLocX; - int shifty = (int) regionY - (int)RegionInfo.RegionWorldLocY; + int shiftx = (int) regionX - (int)RegionInfo.WorldLocX; + int shifty = (int) regionY - (int)RegionInfo.WorldLocY; position.X += shiftx; position.Y += shifty; diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 2677989..28f7896 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -445,8 +445,8 @@ namespace OpenSim.Region.Framework.Scenes { foreach (Scene mscene in m_localScenes) { - if (mscene.RegionInfo.LegacyRegionLocX == locX && - mscene.RegionInfo.LegacyRegionLocY == locY) + if (mscene.RegionInfo.RegionLocX == locX && + mscene.RegionInfo.RegionLocY == locY) { scene = mscene; return true; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8eb6f7d..3f5db12 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -702,7 +702,7 @@ namespace OpenSim.Region.Framework.Scenes uint x, y; Util.RegionHandleToRegionLoc(handle, out x, out y); - if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.LegacyRegionLocX, y, Scene.RegionInfo.LegacyRegionLocY)) + if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) { old.Add(handle); } @@ -2115,8 +2115,8 @@ namespace OpenSim.Region.Framework.Scenes // } // Get terrain height for sub-region in a megaregion if necessary - int X = (int)((m_scene.RegionInfo.RegionWorldLocX) + pos.X); - int Y = (int)((m_scene.RegionInfo.RegionWorldLocY) + pos.Y); + int X = (int)((m_scene.RegionInfo.WorldLocX) + pos.X); + int Y = (int)((m_scene.RegionInfo.WorldLocY) + pos.Y); GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y); // If X and Y is NaN, target_region will be null if (target_region == null) diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 67998a0..95f9caf 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -437,7 +437,7 @@ namespace OpenSim.Region.Framework.Scenes SimStats simStats = new SimStats( - ReportingRegion.LegacyRegionLocX, ReportingRegion.LegacyRegionLocY, regionFlags, (uint)m_objectCapacity, + ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID); handlerSendStatResult = OnSendStatsResult; -- cgit v1.1