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.
varregion
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

@ -184,11 +184,11 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
return false;
}
else if (
regions[i].LegacyRegionLocX == regions[j].LegacyRegionLocX && regions[i].LegacyRegionLocY == regions[j].LegacyRegionLocY)
regions[i].RegionLocX == regions[j].RegionLocX && regions[i].RegionLocY == regions[j].RegionLocY)
{
m_log.ErrorFormat(
"[LOAD REGIONS PLUGIN]: Regions {0} and {1} have the same grid location ({2}, {3})",
regions[i].RegionName, regions[j].RegionName, regions[i].LegacyRegionLocX, regions[i].LegacyRegionLocY);
regions[i].RegionName, regions[j].RegionName, regions[i].RegionLocX, regions[i].RegionLocY);
return false;
}
else if (regions[i].InternalEndPoint.Port == regions[j].InternalEndPoint.Port)

View File

@ -545,7 +545,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception(
String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>",
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
}
else
{
@ -559,8 +559,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
region.RegionID = regionID;
region.originRegionID = regionID;
region.RegionName = (string) requestData["region_name"];
region.LegacyRegionLocX = Convert.ToUInt32(requestData["region_x"]);
region.LegacyRegionLocY = Convert.ToUInt32(requestData["region_y"]);
region.RegionLocX = Convert.ToUInt32(requestData["region_x"]);
region.RegionLocY = Convert.ToUInt32(requestData["region_y"]);
// check for collisions: region name, region UUID,
// region location
@ -568,14 +568,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception(
String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>",
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
if (m_application.SceneManager.TryGetScene(region.LegacyRegionLocX, region.LegacyRegionLocY, out scene))
if (m_application.SceneManager.TryGetScene(region.RegionLocX, region.RegionLocY, out scene))
throw new Exception(
String.Format("region location <{0},{1}> already in use by region {2}, UUID {3}, <{4},{5}>",
region.LegacyRegionLocX, region.LegacyRegionLocY,
region.RegionLocX, region.RegionLocY,
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
region.InternalEndPoint =
new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0);
@ -589,7 +589,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
region.InternalEndPoint.Address,
region.InternalEndPoint.Port,
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
region.ExternalHostName = (string) requestData["external_address"];
@ -628,8 +628,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
String.Format(
m_config.GetString("region_file_template",
"{0}x{1}-{2}.ini"),
region.LegacyRegionLocX.ToString(),
region.LegacyRegionLocY.ToString(),
region.RegionLocX.ToString(),
region.RegionLocY.ToString(),
regionID.ToString(),
region.InternalEndPoint.Port.ToString(),
region.RegionName.Replace(" ", "_").Replace(":", "_").

View File

@ -300,8 +300,8 @@ namespace OpenSim.Data.Tests
RegionInfo regionInfo = new RegionInfo();
regionInfo.RegionID = region3;
regionInfo.LegacyRegionLocX = 0;
regionInfo.LegacyRegionLocY = 0;
regionInfo.RegionLocX = 0;
regionInfo.RegionLocY = 0;
SceneObjectPart sop = new SceneObjectPart();
SceneObjectGroup sog = new SceneObjectGroup(sop);
@ -1066,8 +1066,8 @@ namespace OpenSim.Data.Tests
{
RegionInfo regionInfo = new RegionInfo();
regionInfo.RegionID = regionId;
regionInfo.LegacyRegionLocX = 0;
regionInfo.LegacyRegionLocY = 0;
regionInfo.RegionLocX = 0;
regionInfo.RegionLocY = 0;
SceneObjectPart sop = new SceneObjectPart();
sop.Name = name;

View File

@ -144,9 +144,9 @@ namespace OpenSim.Framework
public UUID ScopeID = UUID.Zero;
private UUID m_maptileStaticUUID = UUID.Zero;
public uint RegionWorldLocX = 0;
public uint RegionWorldLocY = 0;
public uint RegionWorldLocZ = 0;
public uint WorldLocX = 0;
public uint WorldLocY = 0;
public uint WorldLocZ = 0;
public uint RegionSizeX = Constants.RegionSize;
public uint RegionSizeY = Constants.RegionSize;
public uint RegionSizeZ = Constants.RegionHeight;
@ -452,52 +452,28 @@ namespace OpenSim.Framework
/// Coordinate is scaled as world coordinates divided by the legacy region size
/// and is thus is the number of legacy regions.
/// </summary>
public uint LegacyRegionLocX
{
get { return RegionWorldLocX / Constants.RegionSize; }
set { RegionWorldLocX = value * Constants.RegionSize; }
}
/// <summary>
/// The y co-ordinate of this region in map tiles (e.g. 1000).
/// Coordinate is scaled as world coordinates divided by the legacy region size
/// and is thus is the number of legacy regions.
/// </summary>
public uint LegacyRegionLocY
{
get { return RegionWorldLocY / Constants.RegionSize; }
set { RegionWorldLocY = value * Constants.RegionSize; }
}
/// <summary>
/// The x co-ordinate of this region in map tiles (e.g. 1000).
/// Coordinate is scaled as world coordinates divided by the legacy region size
/// and is thus is the number of legacy regions.
/// DO NOT USE FOR NEW CODE! This entrypoint exists for downward compatability with external modules.
/// </summary>
public uint RegionLocX
{
get { return LegacyRegionLocX; }
set { LegacyRegionLocX = value; }
get { return WorldLocX / Constants.RegionSize; }
set { WorldLocX = value * Constants.RegionSize; }
}
/// <summary>
/// The y co-ordinate of this region in map tiles (e.g. 1000).
/// Coordinate is scaled as world coordinates divided by the legacy region size
/// and is thus is the number of legacy regions.
/// DO NOT USE FOR NEW CODE! This entrypoint exists for downward compatability with external modules.
/// </summary>
public uint RegionLocY
{
get { return LegacyRegionLocY; }
set { LegacyRegionLocY = value; }
get { return WorldLocY / Constants.RegionSize; }
set { WorldLocY = value * Constants.RegionSize; }
}
public void SetDefaultRegionSize()
{
RegionWorldLocX = 0;
RegionWorldLocY = 0;
RegionWorldLocZ = 0;
WorldLocX = 0;
WorldLocY = 0;
WorldLocZ = 0;
RegionSizeX = Constants.RegionSize;
RegionSizeY = Constants.RegionSize;
RegionSizeZ = Constants.RegionHeight;
@ -508,7 +484,7 @@ namespace OpenSim.Framework
// compute the region coordinates from it.
public ulong RegionHandle
{
get { return Util.UIntsToLong(RegionWorldLocX, RegionWorldLocY); }
get { return Util.UIntsToLong(WorldLocX, WorldLocY); }
}
public void SetEndPoint(string ipaddr, int port)
@ -615,8 +591,8 @@ namespace OpenSim.Framework
string[] locationElements = location.Split(new char[] {','});
LegacyRegionLocX = Convert.ToUInt32(locationElements[0]);
LegacyRegionLocY = Convert.ToUInt32(locationElements[1]);
RegionLocX = Convert.ToUInt32(locationElements[0]);
RegionLocY = Convert.ToUInt32(locationElements[1]);
// Region size
// Default to legacy region size if not specified.
@ -815,7 +791,7 @@ namespace OpenSim.Framework
config.Set("RegionUUID", RegionID.ToString());
string location = String.Format("{0},{1}", LegacyRegionLocX, LegacyRegionLocY);
string location = String.Format("{0},{1}", RegionLocX, RegionLocY);
config.Set("Location", location);
if (RegionSizeX != Constants.RegionSize || RegionSizeY != Constants.RegionSize)
@ -909,9 +885,9 @@ namespace OpenSim.Framework
"Region Name", RegionName, true);
configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"Grid Location (X Axis)", LegacyRegionLocX.ToString(), true);
"Grid Location (X Axis)", RegionLocX.ToString(), true);
configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"Grid Location (Y Axis)", LegacyRegionLocY.ToString(), true);
"Grid Location (Y Axis)", RegionLocY.ToString(), true);
configMember.addConfigurationOption("sim_size_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"Size of region in X dimension", RegionSizeX.ToString(), true);
configMember.addConfigurationOption("sim_size_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
@ -1050,10 +1026,10 @@ namespace OpenSim.Framework
RegionName = (string) configuration_result;
break;
case "sim_location_x":
LegacyRegionLocX = (uint) configuration_result;
RegionLocX = (uint) configuration_result;
break;
case "sim_location_y":
LegacyRegionLocY = (uint) configuration_result;
RegionLocY = (uint) configuration_result;
break;
case "sim_size_x":
RegionSizeX = (uint) configuration_result;
@ -1144,8 +1120,8 @@ namespace OpenSim.Framework
args["http_port"] = OSD.FromString(HttpPort.ToString());
args["server_uri"] = OSD.FromString(ServerURI);
args["region_xloc"] = OSD.FromString(LegacyRegionLocX.ToString());
args["region_yloc"] = OSD.FromString(LegacyRegionLocY.ToString());
args["region_xloc"] = OSD.FromString(RegionLocX.ToString());
args["region_yloc"] = OSD.FromString(RegionLocY.ToString());
args["region_size_x"] = OSD.FromString(RegionSizeX.ToString());
args["region_size_y"] = OSD.FromString(RegionSizeY.ToString());
args["region_size_z"] = OSD.FromString(RegionSizeZ.ToString());
@ -1180,13 +1156,13 @@ namespace OpenSim.Framework
{
uint locx;
UInt32.TryParse(args["region_xloc"].AsString(), out locx);
LegacyRegionLocX = locx;
RegionLocX = locx;
}
if (args["region_yloc"] != null)
{
uint locy;
UInt32.TryParse(args["region_yloc"].AsString(), out locy);
LegacyRegionLocY = locy;
RegionLocY = locy;
}
if (args.ContainsKey("region_size_x"))
RegionSizeX = (uint)args["region_size_x"].AsInteger();

View File

@ -825,8 +825,8 @@ namespace OpenSim
MainConsole.Instance.Output(String.Format(
"Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}",
scene.RegionInfo.RegionName,
scene.RegionInfo.LegacyRegionLocX,
scene.RegionInfo.LegacyRegionLocY,
scene.RegionInfo.RegionLocX,
scene.RegionInfo.RegionLocY,
scene.RegionInfo.InternalEndPoint.Port,
scene.RegionInfo.EstateSettings.EstateName));
});

View File

@ -743,7 +743,7 @@ namespace OpenSim
{
m_log.InfoFormat(
"[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
whichRegion.RegionName, whichRegion.LegacyRegionLocX, whichRegion.LegacyRegionLocY);
whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY);
ShutdownClientServer(whichRegion);
IScene scene;

View File

@ -2885,8 +2885,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
pos = (land.AABBMax + land.AABBMin) * 0.5f;
}
reply.Data.GlobalX = info.LegacyRegionLocX + x;
reply.Data.GlobalY = info.LegacyRegionLocY + y;
reply.Data.GlobalX = info.RegionLocX + x;
reply.Data.GlobalY = info.RegionLocY + y;
reply.Data.GlobalZ = pos.Z;
reply.Data.SimName = Utils.StringToBytes(info.RegionName);
reply.Data.SnapshotID = land.SnapshotID;

View File

@ -189,7 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
string message = c.Message;
Scene scene = (Scene)c.Scene;
Vector3 fromPos = c.Position;
Vector3 regionPos = new Vector3(scene.RegionInfo.RegionWorldLocX, scene.RegionInfo.RegionWorldLocY, 0);
Vector3 regionPos = new Vector3(scene.RegionInfo.WorldLocX, scene.RegionInfo.WorldLocY, 0);
if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
{
Vector3 fromRegionPos = fromPos + regionPos;
Vector3 toRegionPos = presence.AbsolutePosition +
new Vector3(presence.Scene.RegionInfo.RegionWorldLocX, presence.Scene.RegionInfo.RegionWorldLocY, 0);
new Vector3(presence.Scene.RegionInfo.WorldLocX, presence.Scene.RegionInfo.WorldLocY, 0);
int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);

View File

@ -663,8 +663,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
Vector3 avaPos = p.AbsolutePosition;
// Getting the global position for the Avatar
Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.RegionWorldLocX + avaPos.X,
remoteClient.Scene.RegionInfo.RegionWorldLocY + avaPos.Y,
Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.WorldLocX + avaPos.X,
remoteClient.Scene.RegionInfo.WorldLocY + avaPos.Y,
avaPos.Z);
string landOwnerName = string.Empty;

View File

@ -491,8 +491,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
// Check that these are not the same coordinates
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.LegacyRegionLocX &&
finalDestination.RegionLocY == sp.Scene.RegionInfo.LegacyRegionLocY)
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX &&
finalDestination.RegionLocY == sp.Scene.RegionInfo.RegionLocY)
{
// Can't do. Viewer crashes
sp.ControllingClient.SendTeleportFailed("Space warp! You would crash. Move to a different region and try again.");
@ -564,8 +564,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI);
// Insanely, RegionLoc on RegionInfo is the 256m map co-ord whilst GridRegion.RegionLoc is the raw meters position.
return Math.Abs(sourceRegion.LegacyRegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
&& Math.Abs(sourceRegion.LegacyRegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
return Math.Abs(sourceRegion.RegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
&& Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
}
/// <summary>
@ -632,7 +632,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
string.Format(
"Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way",
finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY,
sourceRegion.RegionName, sourceRegion.LegacyRegionLocX, sourceRegion.LegacyRegionLocY,
sourceRegion.RegionName, sourceRegion.RegionLocX, sourceRegion.RegionLocY,
MaxTransferDistance));
return;
@ -1919,7 +1919,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (m_regionInfo != null)
{
neighbours = RequestNeighbours(sp, m_regionInfo.LegacyRegionLocX, m_regionInfo.LegacyRegionLocY);
neighbours = RequestNeighbours(sp, m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
}
else
{
@ -2244,10 +2244,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
extent.X = ((int)extent.X / (int)Constants.RegionSize);
extent.Y = ((int)extent.Y / (int)Constants.RegionSize);
swCorner.X = Scene.RegionInfo.LegacyRegionLocX - 1;
swCorner.Y = Scene.RegionInfo.LegacyRegionLocY - 1;
neCorner.X = Scene.RegionInfo.LegacyRegionLocX + extent.X;
neCorner.Y = Scene.RegionInfo.LegacyRegionLocY + extent.Y;
swCorner.X = Scene.RegionInfo.RegionLocX - 1;
swCorner.Y = Scene.RegionInfo.RegionLocY - 1;
neCorner.X = Scene.RegionInfo.RegionLocX + extent.X;
neCorner.Y = Scene.RegionInfo.RegionLocY + extent.Y;
}
/// <summary>
@ -2560,8 +2560,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Vector3 oldGroupPosition = grp.RootPart.GroupPosition;
// Compute the absolute position of the object.
double objectWorldLocX = (double)scene.RegionInfo.RegionWorldLocX + attemptedPosition.X;
double objectWorldLocY = (double)scene.RegionInfo.RegionWorldLocY + attemptedPosition.Y;
double objectWorldLocX = (double)scene.RegionInfo.WorldLocX + attemptedPosition.X;
double objectWorldLocY = (double)scene.RegionInfo.WorldLocY + attemptedPosition.Y;
// Ask the grid service for the region that contains the passed address
GridRegion destination = GetRegionContainingWorldLocation(scene.GridService, scene.RegionInfo.ScopeID, objectWorldLocX, objectWorldLocY);

View File

@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
if (part != null)
{
ObjectRegionName = s.RegionInfo.RegionName;
uint localX = s.RegionInfo.RegionWorldLocX;
uint localY = s.RegionInfo.RegionWorldLocY;
uint localX = s.RegionInfo.WorldLocX;
uint localY = s.RegionInfo.WorldLocY;
ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")";
return part;
}

View File

@ -224,10 +224,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
}
string reason = string.Empty;
if (!m_MapService.AddMapTile((int)scene.RegionInfo.LegacyRegionLocX, (int)scene.RegionInfo.LegacyRegionLocY, jpgData, out reason))
if (!m_MapService.AddMapTile((int)scene.RegionInfo.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason))
{
m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}",
scene.RegionInfo.RegionName, scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY, reason);
scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, reason);
}
}
}

View File

@ -71,8 +71,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public void AddScene(Scene scene)
{
uint x = scene.RegionInfo.LegacyRegionLocX;
uint y = scene.RegionInfo.LegacyRegionLocY;
uint x = scene.RegionInfo.RegionLocX;
uint y = scene.RegionInfo.RegionLocY;
SortedDictionary<uint, Scene> row;
if (!Regions.TryGetValue(y, out row))
@ -120,8 +120,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{
// We add the region's coordinates to ensure uniqueness even if multiple regions have the same name
string path = string.Format("{0}_{1}_{2}",
scene.RegionInfo.LegacyRegionLocX - Rect.X + 1,
scene.RegionInfo.LegacyRegionLocY - Rect.Y + 1,
scene.RegionInfo.RegionLocX - Rect.X + 1,
scene.RegionInfo.RegionLocY - Rect.Y + 1,
scene.RegionInfo.RegionName.Replace(' ', '_'));
m_regionDirs[scene.RegionInfo.RegionID] = path;
});

View File

@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{
foreach (RegionInfo archivedRegion in m_directory2region.Values)
{
Point location = new Point((int)rootScene.RegionInfo.LegacyRegionLocX, (int)rootScene.RegionInfo.LegacyRegionLocY);
Point location = new Point((int)rootScene.RegionInfo.RegionLocX, (int)rootScene.RegionInfo.RegionLocY);
location.Offset(archivedRegion.Location);
Scene scene;

View File

@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
{
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
{
int corner = int.Parse(num);
UUID texture = UUID.Parse(uuid);
@ -135,9 +135,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
int x = (args.Length > 4 ? int.Parse(args[4]) : -1);
int y = (args.Length > 5 ? int.Parse(args[5]) : -1);
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
{
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
{
double selectedheight = double.Parse(heightstring);
@ -159,9 +159,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
{
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
{
int corner = int.Parse(num);
float lowValue = float.Parse(min, Culture.NumberFormatInfo);

View File

@ -1798,8 +1798,8 @@ namespace OpenSim.Region.CoreModules.World.Land
// HACK for now
RegionInfo r = new RegionInfo();
r.RegionName = info.RegionName;
r.LegacyRegionLocX = (uint)info.RegionLocX;
r.LegacyRegionLocY = (uint)info.RegionLocY;
r.RegionLocX = (uint)info.RegionLocX;
r.RegionLocY = (uint)info.RegionLocY;
r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess);
remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y);
}

View File

@ -561,8 +561,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
/// <param name="fileStartY">Where to begin our slice</param>
public void LoadFromFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
{
int offsetX = (int) m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
int offsetY = (int) m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
int offsetX = (int) m_scene.RegionInfo.RegionLocX - fileStartX;
int offsetY = (int) m_scene.RegionInfo.RegionLocY - fileStartY;
if (offsetX >= 0 && offsetX < fileWidth && offsetY >= 0 && offsetY < fileHeight)
{
@ -602,14 +602,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
/// <param name="fileStartY">The may y co-ordinate at which to begin the save.</param>
public void SaveToFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
{
int offsetX = (int)m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
int offsetY = (int)m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
int offsetX = (int)m_scene.RegionInfo.RegionLocX - fileStartX;
int offsetY = (int)m_scene.RegionInfo.RegionLocY - fileStartY;
if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight)
{
MainConsole.Instance.OutputFormat(
"ERROR: file width + minimum X tile and file height + minimum Y tile must incorporate the current region at ({0},{1}). File width {2} from {3} and file height {4} from {5} does not.",
m_scene.RegionInfo.LegacyRegionLocX, m_scene.RegionInfo.LegacyRegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
return;
}

View File

@ -249,7 +249,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// 6/8/2011 -- I'm adding an explicit 2048 check, so that we never forget that there is
// a hack here, and so that regions below 4096 don't get spammed with unnecessary map blocks.
if (m_scene.RegionInfo.LegacyRegionLocX >= 2048 || m_scene.RegionInfo.LegacyRegionLocY >= 2048)
if (m_scene.RegionInfo.RegionLocX >= 2048 || m_scene.RegionInfo.RegionLocY >= 2048)
{
ScenePresence avatarPresence = null;
@ -278,10 +278,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
(int)(m_scene.RegionInfo.LegacyRegionLocX - 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.LegacyRegionLocX + 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.LegacyRegionLocY - 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.LegacyRegionLocY + 8) * (int)Constants.RegionSize);
(int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize);
foreach (GridRegion r in regions)
{
MapBlockData block = new MapBlockData();
@ -1218,10 +1218,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
List<MapBlockData> mapBlocks = new List<MapBlockData>();
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
(int)(m_scene.RegionInfo.LegacyRegionLocX - 9) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.LegacyRegionLocX + 9) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.LegacyRegionLocY - 9) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.LegacyRegionLocY + 9) * (int)Constants.RegionSize);
(int)(m_scene.RegionInfo.RegionLocX - 9) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocX + 9) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocY - 9) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocY + 9) * (int)Constants.RegionSize);
List<AssetBase> textures = new List<AssetBase>();
List<Image> bitImages = new List<Image>();
@ -1262,8 +1262,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
for (int i = 0; i < mapBlocks.Count; i++)
{
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.LegacyRegionLocX) + 10);
ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.LegacyRegionLocY) + 10);
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.RegionLocX) + 10);
ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.RegionLocY) + 10);
g.DrawImage(bitImages[i], (x * 128), 2560 - (y * 128), 128, 128); // y origin is top
}

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;

View File

@ -84,8 +84,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
Region = scene.RegionInfo.RegionName;
Host = scene.RegionInfo.ExternalHostName;
LocX = Convert.ToString(scene.RegionInfo.LegacyRegionLocX);
LocY = Convert.ToString(scene.RegionInfo.LegacyRegionLocY);
LocX = Convert.ToString(scene.RegionInfo.RegionLocX);
LocY = Convert.ToString(scene.RegionInfo.RegionLocY);
IDK = Convert.ToString(_idk_++);
showAlert = config.GetBoolean("alert_show", false);

View File

@ -100,8 +100,8 @@ namespace OpenSim.Region.RegionCombinerModule
UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem,
UUID fromtaskid)
{
int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
rayend.X += differenceX * (int)Constants.RegionSize;
rayend.Y += differenceY * (int)Constants.RegionSize;
raystart.X += differenceX * (int)Constants.RegionSize;
@ -126,8 +126,8 @@ namespace OpenSim.Region.RegionCombinerModule
PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid,
byte rayendisintersection)
{
int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
rayend.X += differenceX * (int)Constants.RegionSize;
rayend.Y += differenceY * (int)Constants.RegionSize;
raystart.X += differenceX * (int)Constants.RegionSize;

View File

@ -246,8 +246,8 @@ namespace OpenSim.Region.RegionCombinerModule
newConn.RegionScene = scene;
newConn.RegionLandChannel = scene.LandChannel;
newConn.RegionId = scene.RegionInfo.originRegionID;
newConn.X = scene.RegionInfo.LegacyRegionLocX;
newConn.Y = scene.RegionInfo.LegacyRegionLocY;
newConn.X = scene.RegionInfo.RegionLocX;
newConn.Y = scene.RegionInfo.RegionLocY;
newConn.XEnd = (int)Constants.RegionSize;
newConn.YEnd = (int)Constants.RegionSize;
@ -502,11 +502,11 @@ namespace OpenSim.Region.RegionCombinerModule
lock (scene.WestBorders)
{
scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocX - rootConn.RegionScene.RegionInfo.LegacyRegionLocX) * (int)Constants.RegionSize); //auto teleport West
scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocX - rootConn.RegionScene.RegionInfo.RegionLocX) * (int)Constants.RegionSize); //auto teleport West
// Trigger auto teleport to root region
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
}
// Reset Terrain.. since terrain loads before we get here, we need to load
@ -564,9 +564,9 @@ namespace OpenSim.Region.RegionCombinerModule
lock (scene.SouthBorders)
{
scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocY - rootConn.RegionScene.RegionInfo.LegacyRegionLocY) * (int)Constants.RegionSize); //auto teleport south
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocY - rootConn.RegionScene.RegionInfo.RegionLocY) * (int)Constants.RegionSize); //auto teleport south
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
}
// Reset Terrain.. since terrain normally loads first.
@ -636,9 +636,9 @@ namespace OpenSim.Region.RegionCombinerModule
lock (scene.SouthBorders)
{
scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocY - rootConn.RegionScene.RegionInfo.LegacyRegionLocY) * (int)Constants.RegionSize); //auto teleport south
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocY - rootConn.RegionScene.RegionInfo.RegionLocY) * (int)Constants.RegionSize); //auto teleport south
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
}
lock (rootConn.RegionScene.EastBorders)
@ -657,9 +657,9 @@ namespace OpenSim.Region.RegionCombinerModule
lock (scene.WestBorders)
{
scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocX - rootConn.RegionScene.RegionInfo.LegacyRegionLocX) * (int)Constants.RegionSize); //auto teleport West
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocX - rootConn.RegionScene.RegionInfo.RegionLocX) * (int)Constants.RegionSize); //auto teleport West
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
}
/*

View File

@ -4244,7 +4244,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
DataserverPlugin.RegisterRequest(m_host.LocalId,
m_item.ItemID, item.AssetID.ToString());
Vector3 region = new Vector3(World.RegionInfo.RegionWorldLocX, World.RegionInfo.RegionWorldLocY, 0);
Vector3 region = new Vector3(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0);
World.AssetService.Get(item.AssetID.ToString(), this,
delegate(string i, object sender, AssetBase a)
@ -5478,7 +5478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llGetRegionCorner()
{
m_host.AddScriptLPS(1);
return new LSL_Vector(World.RegionInfo.RegionWorldLocX, World.RegionInfo.RegionWorldLocY, 0);
return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0);
}
/// <summary>
@ -5651,8 +5651,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
uint neighborX = World.RegionInfo.LegacyRegionLocX + (uint)dir.x;
uint neighborY = World.RegionInfo.LegacyRegionLocY + (uint)dir.y;
uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
foreach (GridRegion sri in neighbors)
{
@ -10767,7 +10767,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
httpHeaders["X-SecondLife-Shard"] = shard;
httpHeaders["X-SecondLife-Object-Name"] = m_host.Name;
httpHeaders["X-SecondLife-Object-Key"] = m_host.UUID.ToString();
httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.LegacyRegionLocX, regionInfo.LegacyRegionLocY);
httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.RegionLocX, regionInfo.RegionLocY);
httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z);
httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z);
httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W);

View File

@ -201,8 +201,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
NameValueCollection requestArgs = new NameValueCollection
{
{ "RequestMethod", "xAddMapTile" },
{ "X", scene.RegionInfo.LegacyRegionLocX.ToString() },
{ "Y", scene.RegionInfo.LegacyRegionLocY.ToString() },
{ "X", scene.RegionInfo.RegionLocX.ToString() },
{ "Y", scene.RegionInfo.RegionLocY.ToString() },
{ "ContentType", "image/png" },
{ "EncodedData", System.Convert.ToBase64String(pngData) }
};

View File

@ -255,8 +255,8 @@ namespace OpenSim.Services.Interfaces
public GridRegion(RegionInfo ConvertFrom)
{
m_regionName = ConvertFrom.RegionName;
m_regionLocX = (int)(ConvertFrom.RegionWorldLocX);
m_regionLocY = (int)(ConvertFrom.RegionWorldLocY);
m_regionLocX = (int)(ConvertFrom.WorldLocX);
m_regionLocY = (int)(ConvertFrom.WorldLocY);
RegionSizeX = (int)ConvertFrom.RegionSizeX;
RegionSizeY = (int)ConvertFrom.RegionSizeY;
m_internalEndPoint = ConvertFrom.InternalEndPoint;