VarRegion: change RegionInfo storage of region coordinates from region

count number to integer world coordinates.
Added new methods RegionWorldLoc[XY].
Refactored name of 'RegionLoc*' to 'LegacyRegionLoc*' throughout OpenSim.
Kept old 'RegionLoc*' entrypoint to RegionInfo for downward compatability
of external region management packages.
varregion
Robert Adams 2013-09-19 12:14:21 -07:00
parent e24edada24
commit 96abbbb6fb
28 changed files with 192 additions and 156 deletions

View File

@ -184,11 +184,11 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
return false;
}
else if (
regions[i].RegionLocX == regions[j].RegionLocX && regions[i].RegionLocY == regions[j].RegionLocY)
regions[i].LegacyRegionLocX == regions[j].LegacyRegionLocX && regions[i].LegacyRegionLocY == regions[j].LegacyRegionLocY)
{
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].RegionLocX, regions[i].RegionLocY);
regions[i].RegionName, regions[j].RegionName, regions[i].LegacyRegionLocX, regions[i].LegacyRegionLocY);
return false;
}
else if (regions[i].InternalEndPoint.Port == regions[j].InternalEndPoint.Port)

View File

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

View File

@ -137,8 +137,8 @@ namespace OpenSim.Framework
public bool m_allow_alternate_ports;
protected string m_externalHostName;
protected IPEndPoint m_internalEndPoint;
protected uint? m_regionLocX;
protected uint? m_regionLocY;
public uint RegionWorldLocX { get; set; }
public uint RegionWorldLocY { get; set; }
protected uint m_remotingPort;
public UUID RegionID = UUID.Zero;
public string RemotingAddress;
@ -147,6 +147,11 @@ namespace OpenSim.Framework
private Dictionary<String, String> m_otherSettings = new Dictionary<string, string>();
// Originally, regions were fixed size of 256 in X and Y.
// For downward compatability, 'RegionLocX' returns the region coordinates in the legacy region units.
// This is the constant used to convert world integer coordinates to legacy region units.
public const uint LegacyRegionSize = 256;
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
@ -229,10 +234,10 @@ namespace OpenSim.Framework
m_serverURI = string.Empty;
}
public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
public RegionInfo(uint legacyRegionLocX, uint legacyRegionLocY, IPEndPoint internalEndPoint, string externalUri)
{
m_regionLocX = regionLocX;
m_regionLocY = regionLocY;
RegionWorldLocX = legacyRegionLocX * LegacyRegionSize;
RegionWorldLocY = legacyRegionLocY * LegacyRegionSize;
m_internalEndPoint = internalEndPoint;
m_externalHostName = externalUri;
@ -447,25 +452,56 @@ namespace OpenSim.Framework
/// <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.
/// </summary>
public uint RegionLocX
public uint LegacyRegionLocX
{
get { return m_regionLocX.Value; }
set { m_regionLocX = value; }
get { return RegionWorldLocX / LegacyRegionSize; }
set { RegionWorldLocX = value * LegacyRegionSize; }
}
/// <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 / LegacyRegionSize; }
set { RegionWorldLocY = value * LegacyRegionSize; }
}
/// <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.
/// This entrypoint exists for downward compatability for external modules.
/// </summary>
public uint RegionLocX
{
get { return LegacyRegionLocX; }
set { LegacyRegionLocX = value; }
}
/// <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.
/// This entrypoint exists for downward compatability for external modules.
/// </summary>
public uint RegionLocY
{
get { return m_regionLocY.Value; }
set { m_regionLocY = value; }
get { return LegacyRegionLocY; }
set { LegacyRegionLocY = value; }
}
// A unique region handle is created from the region's world coordinates.
// This cannot be changed because some code expects to receive the region handle and then
// compute the region coordinates from it.
public ulong RegionHandle
{
get { return Util.UIntsToLong((RegionLocX * (uint) Constants.RegionSize), (RegionLocY * (uint) Constants.RegionSize)); }
get { return Util.UIntsToLong(RegionWorldLocX, RegionWorldLocY); }
}
public void SetEndPoint(string ipaddr, int port)
@ -572,8 +608,8 @@ namespace OpenSim.Framework
string[] locationElements = location.Split(new char[] {','});
m_regionLocX = Convert.ToUInt32(locationElements[0]);
m_regionLocY = Convert.ToUInt32(locationElements[1]);
LegacyRegionLocX = Convert.ToUInt32(locationElements[0]);
LegacyRegionLocY = Convert.ToUInt32(locationElements[1]);
// InternalAddress
//
@ -704,7 +740,7 @@ namespace OpenSim.Framework
config.Set("RegionUUID", RegionID.ToString());
string location = String.Format("{0},{1}", m_regionLocX, m_regionLocY);
string location = String.Format("{0},{1}", LegacyRegionLocX, LegacyRegionLocY);
config.Set("Location", location);
config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
@ -790,9 +826,9 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Region Name", RegionName, true);
configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"Grid Location (X Axis)", m_regionLocX.ToString(), true);
"Grid Location (X Axis)", LegacyRegionLocX.ToString(), true);
configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"Grid Location (Y Axis)", m_regionLocY.ToString(), true);
"Grid Location (Y Axis)", LegacyRegionLocY.ToString(), true);
//m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
configMember.addConfigurationOption("internal_ip_address",
ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
@ -916,10 +952,10 @@ namespace OpenSim.Framework
RegionName = (string) configuration_result;
break;
case "sim_location_x":
m_regionLocX = (uint) configuration_result;
LegacyRegionLocX = (uint) configuration_result;
break;
case "sim_location_y":
m_regionLocY = (uint) configuration_result;
LegacyRegionLocY = (uint) configuration_result;
break;
case "internal_ip_address":
IPAddress address = (IPAddress) configuration_result;
@ -1000,8 +1036,8 @@ namespace OpenSim.Framework
args["external_host_name"] = OSD.FromString(ExternalHostName);
args["http_port"] = OSD.FromString(HttpPort.ToString());
args["server_uri"] = OSD.FromString(ServerURI);
args["region_xloc"] = OSD.FromString(RegionLocX.ToString());
args["region_yloc"] = OSD.FromString(RegionLocY.ToString());
args["region_xloc"] = OSD.FromString(LegacyRegionLocX.ToString());
args["region_yloc"] = OSD.FromString(LegacyRegionLocY.ToString());
args["internal_ep_address"] = OSD.FromString(InternalEndPoint.Address.ToString());
args["internal_ep_port"] = OSD.FromString(InternalEndPoint.Port.ToString());
if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
@ -1032,13 +1068,13 @@ namespace OpenSim.Framework
{
uint locx;
UInt32.TryParse(args["region_xloc"].AsString(), out locx);
RegionLocX = locx;
LegacyRegionLocX = locx;
}
if (args["region_yloc"] != null)
{
uint locy;
UInt32.TryParse(args["region_yloc"].AsString(), out locy);
RegionLocY = locy;
LegacyRegionLocY = locy;
}
IPAddress ip_addr = null;
if (args["internal_ep_address"] != null)
@ -1081,8 +1117,8 @@ namespace OpenSim.Framework
{
Dictionary<string, object> kvp = new Dictionary<string, object>();
kvp["uuid"] = RegionID.ToString();
kvp["locX"] = RegionLocX.ToString();
kvp["locY"] = RegionLocY.ToString();
kvp["locX"] = LegacyRegionLocX.ToString();
kvp["locY"] = LegacyRegionLocY.ToString();
kvp["external_ip_address"] = ExternalEndPoint.Address.ToString();
kvp["external_port"] = ExternalEndPoint.Port.ToString();
kvp["external_host_name"] = ExternalHostName;

View File

@ -763,8 +763,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.RegionLocX,
scene.RegionInfo.RegionLocY,
scene.RegionInfo.LegacyRegionLocX,
scene.RegionInfo.LegacyRegionLocY,
scene.RegionInfo.InternalEndPoint.Port,
scene.RegionInfo.EstateSettings.EstateName));
});

View File

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

View File

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

View File

@ -180,8 +180,8 @@ 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.RegionLocX * Constants.RegionSize,
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
Vector3 regionPos = new Vector3(scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
@ -333,8 +333,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
{
Vector3 fromRegionPos = fromPos + regionPos;
Vector3 toRegionPos = presence.AbsolutePosition +
new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
new Vector3(presence.Scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
presence.Scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 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.RegionLocX*Constants.RegionSize + avaPos.X,
remoteClient.Scene.RegionInfo.RegionLocY*Constants.RegionSize + avaPos.Y,
Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.LegacyRegionLocX*Constants.RegionSize + avaPos.X,
remoteClient.Scene.RegionInfo.LegacyRegionLocY*Constants.RegionSize + avaPos.Y,
avaPos.Z);
string landOwnerName = string.Empty;

View File

@ -494,8 +494,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
// Check that these are not the same coordinates
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX &&
finalDestination.RegionLocY == sp.Scene.RegionInfo.RegionLocY)
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.LegacyRegionLocX &&
finalDestination.RegionLocY == sp.Scene.RegionInfo.LegacyRegionLocY)
{
// Can't do. Viewer crashes
sp.ControllingClient.SendTeleportFailed("Space warp! You would crash. Move to a different region and try again.");
@ -567,8 +567,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.RegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
&& Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
return Math.Abs(sourceRegion.LegacyRegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
&& Math.Abs(sourceRegion.LegacyRegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
}
/// <summary>
@ -635,7 +635,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.RegionLocX, sourceRegion.RegionLocY,
sourceRegion.RegionName, sourceRegion.LegacyRegionLocX, sourceRegion.LegacyRegionLocY,
MaxTransferDistance));
return;
@ -1374,8 +1374,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name);
Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
uint neighbourx = scene.RegionInfo.RegionLocX;
uint neighboury = scene.RegionInfo.RegionLocY;
uint neighbourx = scene.RegionInfo.LegacyRegionLocX;
uint neighboury = scene.RegionInfo.LegacyRegionLocY;
const float boundaryDistance = 1.7f;
Vector3 northCross = new Vector3(0, boundaryDistance, 0);
Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
@ -1408,8 +1408,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
neighbourx = b.TriggerRegionX;
Vector3 newposition = pos;
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@ -1431,8 +1431,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
neighbourx = ba.TriggerRegionX;
Vector3 newposition = pos;
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@ -1462,8 +1462,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
neighboury = ba.TriggerRegionY;
neighbourx = ba.TriggerRegionX;
Vector3 newposition = pos;
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@ -1492,8 +1492,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
neighboury = b.TriggerRegionY;
neighbourx = b.TriggerRegionX;
Vector3 newposition = pos;
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
agent.ControllingClient.SendAgentAlertMessage(
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@ -1901,7 +1901,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (m_regionInfo != null)
{
neighbours = RequestNeighbours(sp, m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
neighbours = RequestNeighbours(sp, m_regionInfo.LegacyRegionLocX, m_regionInfo.LegacyRegionLocY);
}
else
{
@ -2057,8 +2057,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour)
{
int rRegionX = (int)sp.Scene.RegionInfo.RegionLocX;
int rRegionY = (int)sp.Scene.RegionInfo.RegionLocY;
int rRegionX = (int)sp.Scene.RegionInfo.LegacyRegionLocX;
int rRegionY = (int)sp.Scene.RegionInfo.LegacyRegionLocY;
int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize;
int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize;
int shiftx = (rRegionX - tRegionX) * (int)Constants.RegionSize;
@ -2161,10 +2161,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.RegionLocX - 1;
swCorner.Y = Scene.RegionInfo.RegionLocY - 1;
neCorner.X = Scene.RegionInfo.RegionLocX + extent.X;
neCorner.Y = Scene.RegionInfo.RegionLocY + extent.Y;
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;
}
/// <summary>
@ -2301,8 +2301,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return;
}
int thisx = (int)scene.RegionInfo.RegionLocX;
int thisy = (int)scene.RegionInfo.RegionLocY;
int thisx = (int)scene.RegionInfo.LegacyRegionLocX;
int thisy = (int)scene.RegionInfo.LegacyRegionLocY;
Vector3 EastCross = new Vector3(0.1f, 0, 0);
Vector3 WestCross = new Vector3(-0.1f, 0, 0);
Vector3 NorthCross = new Vector3(0, 0.1f, 0);

View File

@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
if (part != null)
{
ObjectRegionName = s.RegionInfo.RegionName;
uint localX = (s.RegionInfo.RegionLocX * (int)Constants.RegionSize);
uint localY = (s.RegionInfo.RegionLocY * (int)Constants.RegionSize);
uint localX = (s.RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize);
uint localY = (s.RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize);
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.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason))
if (!m_MapService.AddMapTile((int)scene.RegionInfo.LegacyRegionLocX, (int)scene.RegionInfo.LegacyRegionLocY, 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.RegionLocX, scene.RegionInfo.RegionLocY, reason);
scene.RegionInfo.RegionName, scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY, reason);
}
}
}

View File

@ -71,8 +71,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public void AddScene(Scene scene)
{
uint x = scene.RegionInfo.RegionLocX;
uint y = scene.RegionInfo.RegionLocY;
uint x = scene.RegionInfo.LegacyRegionLocX;
uint y = scene.RegionInfo.LegacyRegionLocY;
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.RegionLocX - Rect.X + 1,
scene.RegionInfo.RegionLocY - Rect.Y + 1,
scene.RegionInfo.LegacyRegionLocX - Rect.X + 1,
scene.RegionInfo.LegacyRegionLocY - 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.RegionLocX, (int)rootScene.RegionInfo.RegionLocY);
Point location = new Point((int)rootScene.RegionInfo.LegacyRegionLocX, (int)rootScene.RegionInfo.LegacyRegionLocY);
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.RegionLocX == x)
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
{
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == 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.RegionLocX == x)
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
{
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == 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.RegionLocX == x)
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
{
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
{
int corner = int.Parse(num);
float lowValue = float.Parse(min, Culture.NumberFormatInfo);

View File

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

View File

@ -553,8 +553,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.RegionLocX - fileStartX;
int offsetY = (int) m_scene.RegionInfo.RegionLocY - fileStartY;
int offsetX = (int) m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
int offsetY = (int) m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
if (offsetX >= 0 && offsetX < fileWidth && offsetY >= 0 && offsetY < fileHeight)
{
@ -594,14 +594,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.RegionLocX - fileStartX;
int offsetY = (int)m_scene.RegionInfo.RegionLocY - fileStartY;
int offsetX = (int)m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
int offsetY = (int)m_scene.RegionInfo.LegacyRegionLocY - 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.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
m_scene.RegionInfo.LegacyRegionLocX, m_scene.RegionInfo.LegacyRegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
return;
}

View File

@ -240,7 +240,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.RegionLocX >= 2048 || m_scene.RegionInfo.RegionLocY >= 2048)
if (m_scene.RegionInfo.LegacyRegionLocX >= 2048 || m_scene.RegionInfo.LegacyRegionLocY >= 2048)
{
ScenePresence avatarPresence = null;
@ -269,10 +269,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.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);
(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);
foreach (GridRegion r in regions)
{
MapBlockData block = new MapBlockData();
@ -1199,10 +1199,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.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);
(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);
List<AssetBase> textures = new List<AssetBase>();
List<Image> bitImages = new List<Image>();
@ -1243,8 +1243,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
for (int i = 0; i < mapBlocks.Count; i++)
{
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.RegionLocX) + 10);
ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.RegionLocY) + 10);
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.LegacyRegionLocX) + 10);
ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.LegacyRegionLocY) + 10);
g.DrawImage(bitImages[i], (x * 128), 2560 - (y * 128), 128, 128); // y origin is top
}

View File

@ -1107,8 +1107,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.RegionLocX);
int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY);
int resultX = Math.Abs((int)xcell - (int)RegionInfo.LegacyRegionLocX);
int resultY = Math.Abs((int)ycell - (int)RegionInfo.LegacyRegionLocY);
if (resultX <= 1 && resultY <= 1)
{
// Let the grid service module know, so this can be cached
@ -1183,8 +1183,8 @@ namespace OpenSim.Region.Framework.Scenes
/// </returns>
public int HaveNeighbor(Cardinals car, ref int[] fix)
{
uint neighbourx = RegionInfo.RegionLocX;
uint neighboury = RegionInfo.RegionLocY;
uint neighbourx = RegionInfo.LegacyRegionLocX;
uint neighboury = RegionInfo.LegacyRegionLocY;
int dir = (int)car;
@ -1204,8 +1204,8 @@ namespace OpenSim.Region.Framework.Scenes
if (neighbourRegion == null)
{
fix[0] = (int)(RegionInfo.RegionLocX - neighbourx);
fix[1] = (int)(RegionInfo.RegionLocY - neighboury);
fix[0] = (int)(RegionInfo.LegacyRegionLocX - neighbourx);
fix[1] = (int)(RegionInfo.LegacyRegionLocY - neighboury);
return dir * (-1);
}
else
@ -4371,8 +4371,8 @@ namespace OpenSim.Region.Framework.Scenes
{
uint rRegionX = (uint)(cAgentData.RegionHandle >> 40);
uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8);
uint tRegionX = RegionInfo.RegionLocX;
uint tRegionY = RegionInfo.RegionLocY;
uint tRegionX = RegionInfo.LegacyRegionLocX;
uint tRegionY = RegionInfo.LegacyRegionLocY;
//Send Data to ScenePresence
childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY);
// Not Implemented:
@ -4600,13 +4600,13 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence sp = GetScenePresence(remoteClient.AgentId);
if (sp != null)
{
uint regionX = RegionInfo.RegionLocX;
uint regionY = RegionInfo.RegionLocY;
uint regionX = RegionInfo.LegacyRegionLocX;
uint regionY = RegionInfo.LegacyRegionLocY;
Utils.LongToUInts(regionHandle, out regionX, out regionY);
int shiftx = (int) regionX - (int) RegionInfo.RegionLocX * (int)Constants.RegionSize;
int shifty = (int) regionY - (int) RegionInfo.RegionLocY * (int)Constants.RegionSize;
int shiftx = (int) regionX - (int) RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize;
int shifty = (int) regionY - (int) RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize;
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.RegionLocX == locX &&
mscene.RegionInfo.RegionLocY == locY)
if (mscene.RegionInfo.LegacyRegionLocX == locX &&
mscene.RegionInfo.LegacyRegionLocY == locY)
{
scene = mscene;
return true;

View File

@ -710,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes
Utils.LongToUInts(handle, out x, out y);
x = x / Constants.RegionSize;
y = y / Constants.RegionSize;
if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY))
if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.LegacyRegionLocX, y, Scene.RegionInfo.LegacyRegionLocY))
{
old.Add(handle);
}
@ -2094,8 +2094,8 @@ namespace OpenSim.Region.Framework.Scenes
// }
// Get terrain height for sub-region in a megaregion if necessary
int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X);
int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y);
int X = (int)((m_scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize) + pos.X);
int Y = (int)((m_scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize) + 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.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity,
ReportingRegion.LegacyRegionLocX, ReportingRegion.LegacyRegionLocY, 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.RegionLocX);
LocY = Convert.ToString(scene.RegionInfo.RegionLocY);
LocX = Convert.ToString(scene.RegionInfo.LegacyRegionLocX);
LocY = Convert.ToString(scene.RegionInfo.LegacyRegionLocY);
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.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
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.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
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.RegionLocX;
newConn.Y = scene.RegionInfo.RegionLocY;
newConn.X = scene.RegionInfo.LegacyRegionLocX;
newConn.Y = scene.RegionInfo.LegacyRegionLocY;
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.RegionLocX - rootConn.RegionScene.RegionInfo.RegionLocX) * (int)Constants.RegionSize); //auto teleport West
scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocX - rootConn.RegionScene.RegionInfo.LegacyRegionLocX) * (int)Constants.RegionSize); //auto teleport West
// Trigger auto teleport to root region
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
}
// 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.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;
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;
}
// 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.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;
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;
}
lock (rootConn.RegionScene.EastBorders)
@ -657,9 +657,9 @@ namespace OpenSim.Region.RegionCombinerModule
lock (scene.WestBorders)
{
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;
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;
}
/*

View File

@ -4242,8 +4242,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_item.ItemID, item.AssetID.ToString());
Vector3 region = new Vector3(
World.RegionInfo.RegionLocX * Constants.RegionSize,
World.RegionInfo.RegionLocY * Constants.RegionSize,
World.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
World.RegionInfo.LegacyRegionLocY * Constants.RegionSize,
0);
World.AssetService.Get(item.AssetID.ToString(), this,
@ -5478,7 +5478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llGetRegionCorner()
{
m_host.AddScriptLPS(1);
return new LSL_Vector(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
return new LSL_Vector(World.RegionInfo.LegacyRegionLocX * Constants.RegionSize, World.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 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.RegionLocX + (uint)dir.x;
uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
uint neighborX = World.RegionInfo.LegacyRegionLocX + (uint)dir.x;
uint neighborY = World.RegionInfo.LegacyRegionLocY + (uint)dir.y;
foreach (GridRegion sri in neighbors)
{
@ -10737,7 +10737,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.RegionLocX, regionInfo.RegionLocY);
httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.LegacyRegionLocX, regionInfo.LegacyRegionLocY);
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.RegionLocX.ToString() },
{ "Y", scene.RegionInfo.RegionLocY.ToString() },
{ "X", scene.RegionInfo.LegacyRegionLocX.ToString() },
{ "Y", scene.RegionInfo.LegacyRegionLocY.ToString() },
{ "ContentType", "image/png" },
{ "EncodedData", System.Convert.ToBase64String(pngData) }
};

View File

@ -246,8 +246,8 @@ namespace OpenSim.Services.Interfaces
public GridRegion(RegionInfo ConvertFrom)
{
m_regionName = ConvertFrom.RegionName;
m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize);
m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize);
m_regionLocX = (int)(ConvertFrom.LegacyRegionLocX * Constants.RegionSize);
m_regionLocY = (int)(ConvertFrom.LegacyRegionLocY * Constants.RegionSize);
m_internalEndPoint = ConvertFrom.InternalEndPoint;
m_externalHostName = ConvertFrom.ExternalHostName;
m_httpPort = ConvertFrom.HttpPort;