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.
This commit is contained in:
Robert Adams
2013-12-14 07:53:01 -08:00
parent 4eb52eb19e
commit 13a9a4b653
28 changed files with 137 additions and 161 deletions

View File

@@ -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
/// </returns>
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;

View File

@@ -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;

View File

@@ -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)

View File

@@ -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;