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
parent
e24edada24
commit
96abbbb6fb
|
@ -184,11 +184,11 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (
|
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(
|
m_log.ErrorFormat(
|
||||||
"[LOAD REGIONS PLUGIN]: Regions {0} and {1} have the same grid location ({2}, {3})",
|
"[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;
|
return false;
|
||||||
}
|
}
|
||||||
else if (regions[i].InternalEndPoint.Port == regions[j].InternalEndPoint.Port)
|
else if (regions[i].InternalEndPoint.Port == regions[j].InternalEndPoint.Port)
|
||||||
|
|
|
@ -542,7 +542,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>",
|
String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>",
|
||||||
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
|
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
|
||||||
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
|
scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -556,8 +556,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
region.RegionID = regionID;
|
region.RegionID = regionID;
|
||||||
region.originRegionID = regionID;
|
region.originRegionID = regionID;
|
||||||
region.RegionName = (string) requestData["region_name"];
|
region.RegionName = (string) requestData["region_name"];
|
||||||
region.RegionLocX = Convert.ToUInt32(requestData["region_x"]);
|
region.LegacyRegionLocX = Convert.ToUInt32(requestData["region_x"]);
|
||||||
region.RegionLocY = Convert.ToUInt32(requestData["region_y"]);
|
region.LegacyRegionLocY = Convert.ToUInt32(requestData["region_y"]);
|
||||||
|
|
||||||
// check for collisions: region name, region UUID,
|
// check for collisions: region name, region UUID,
|
||||||
// region location
|
// region location
|
||||||
|
@ -565,14 +565,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>",
|
String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>",
|
||||||
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
|
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(
|
throw new Exception(
|
||||||
String.Format("region location <{0},{1}> already in use by region {2}, UUID {3}, <{4},{5}>",
|
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.RegionName, scene.RegionInfo.RegionID,
|
||||||
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
|
scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
|
||||||
|
|
||||||
region.InternalEndPoint =
|
region.InternalEndPoint =
|
||||||
new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0);
|
new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0);
|
||||||
|
@ -586,7 +586,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
region.InternalEndPoint.Address,
|
region.InternalEndPoint.Address,
|
||||||
region.InternalEndPoint.Port,
|
region.InternalEndPoint.Port,
|
||||||
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
|
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
|
||||||
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
|
scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
|
||||||
|
|
||||||
region.ExternalHostName = (string) requestData["external_address"];
|
region.ExternalHostName = (string) requestData["external_address"];
|
||||||
|
|
||||||
|
@ -625,8 +625,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
String.Format(
|
String.Format(
|
||||||
m_config.GetString("region_file_template",
|
m_config.GetString("region_file_template",
|
||||||
"{0}x{1}-{2}.ini"),
|
"{0}x{1}-{2}.ini"),
|
||||||
region.RegionLocX.ToString(),
|
region.LegacyRegionLocX.ToString(),
|
||||||
region.RegionLocY.ToString(),
|
region.LegacyRegionLocY.ToString(),
|
||||||
regionID.ToString(),
|
regionID.ToString(),
|
||||||
region.InternalEndPoint.Port.ToString(),
|
region.InternalEndPoint.Port.ToString(),
|
||||||
region.RegionName.Replace(" ", "_").Replace(":", "_").
|
region.RegionName.Replace(" ", "_").Replace(":", "_").
|
||||||
|
|
|
@ -300,8 +300,8 @@ namespace OpenSim.Data.Tests
|
||||||
|
|
||||||
RegionInfo regionInfo = new RegionInfo();
|
RegionInfo regionInfo = new RegionInfo();
|
||||||
regionInfo.RegionID = region3;
|
regionInfo.RegionID = region3;
|
||||||
regionInfo.RegionLocX = 0;
|
regionInfo.LegacyRegionLocX = 0;
|
||||||
regionInfo.RegionLocY = 0;
|
regionInfo.LegacyRegionLocY = 0;
|
||||||
|
|
||||||
SceneObjectPart sop = new SceneObjectPart();
|
SceneObjectPart sop = new SceneObjectPart();
|
||||||
SceneObjectGroup sog = new SceneObjectGroup(sop);
|
SceneObjectGroup sog = new SceneObjectGroup(sop);
|
||||||
|
@ -1066,8 +1066,8 @@ namespace OpenSim.Data.Tests
|
||||||
{
|
{
|
||||||
RegionInfo regionInfo = new RegionInfo();
|
RegionInfo regionInfo = new RegionInfo();
|
||||||
regionInfo.RegionID = regionId;
|
regionInfo.RegionID = regionId;
|
||||||
regionInfo.RegionLocX = 0;
|
regionInfo.LegacyRegionLocX = 0;
|
||||||
regionInfo.RegionLocY = 0;
|
regionInfo.LegacyRegionLocY = 0;
|
||||||
|
|
||||||
SceneObjectPart sop = new SceneObjectPart();
|
SceneObjectPart sop = new SceneObjectPart();
|
||||||
sop.Name = name;
|
sop.Name = name;
|
||||||
|
|
|
@ -137,8 +137,8 @@ namespace OpenSim.Framework
|
||||||
public bool m_allow_alternate_ports;
|
public bool m_allow_alternate_ports;
|
||||||
protected string m_externalHostName;
|
protected string m_externalHostName;
|
||||||
protected IPEndPoint m_internalEndPoint;
|
protected IPEndPoint m_internalEndPoint;
|
||||||
protected uint? m_regionLocX;
|
public uint RegionWorldLocX { get; set; }
|
||||||
protected uint? m_regionLocY;
|
public uint RegionWorldLocY { get; set; }
|
||||||
protected uint m_remotingPort;
|
protected uint m_remotingPort;
|
||||||
public UUID RegionID = UUID.Zero;
|
public UUID RegionID = UUID.Zero;
|
||||||
public string RemotingAddress;
|
public string RemotingAddress;
|
||||||
|
@ -147,6 +147,11 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
private Dictionary<String, String> m_otherSettings = new Dictionary<string, string>();
|
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.
|
// 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;
|
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;
|
RegionWorldLocX = legacyRegionLocX * LegacyRegionSize;
|
||||||
m_regionLocY = regionLocY;
|
RegionWorldLocY = legacyRegionLocY * LegacyRegionSize;
|
||||||
|
|
||||||
m_internalEndPoint = internalEndPoint;
|
m_internalEndPoint = internalEndPoint;
|
||||||
m_externalHostName = externalUri;
|
m_externalHostName = externalUri;
|
||||||
|
@ -447,25 +452,56 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The x co-ordinate of this region in map tiles (e.g. 1000).
|
/// 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>
|
/// </summary>
|
||||||
public uint RegionLocX
|
public uint LegacyRegionLocX
|
||||||
{
|
{
|
||||||
get { return m_regionLocX.Value; }
|
get { return RegionWorldLocX / LegacyRegionSize; }
|
||||||
set { m_regionLocX = value; }
|
set { RegionWorldLocX = value * LegacyRegionSize; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The y co-ordinate of this region in map tiles (e.g. 1000).
|
/// 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>
|
/// </summary>
|
||||||
public uint RegionLocY
|
public uint RegionLocY
|
||||||
{
|
{
|
||||||
get { return m_regionLocY.Value; }
|
get { return LegacyRegionLocY; }
|
||||||
set { m_regionLocY = value; }
|
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
|
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)
|
public void SetEndPoint(string ipaddr, int port)
|
||||||
|
@ -572,8 +608,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
string[] locationElements = location.Split(new char[] {','});
|
string[] locationElements = location.Split(new char[] {','});
|
||||||
|
|
||||||
m_regionLocX = Convert.ToUInt32(locationElements[0]);
|
LegacyRegionLocX = Convert.ToUInt32(locationElements[0]);
|
||||||
m_regionLocY = Convert.ToUInt32(locationElements[1]);
|
LegacyRegionLocY = Convert.ToUInt32(locationElements[1]);
|
||||||
|
|
||||||
// InternalAddress
|
// InternalAddress
|
||||||
//
|
//
|
||||||
|
@ -704,7 +740,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
config.Set("RegionUUID", RegionID.ToString());
|
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("Location", location);
|
||||||
|
|
||||||
config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
|
config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
|
||||||
|
@ -790,9 +826,9 @@ namespace OpenSim.Framework
|
||||||
configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
"Region Name", RegionName, true);
|
"Region Name", RegionName, true);
|
||||||
configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
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,
|
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);
|
//m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
|
||||||
configMember.addConfigurationOption("internal_ip_address",
|
configMember.addConfigurationOption("internal_ip_address",
|
||||||
ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
|
ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
|
||||||
|
@ -916,10 +952,10 @@ namespace OpenSim.Framework
|
||||||
RegionName = (string) configuration_result;
|
RegionName = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "sim_location_x":
|
case "sim_location_x":
|
||||||
m_regionLocX = (uint) configuration_result;
|
LegacyRegionLocX = (uint) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "sim_location_y":
|
case "sim_location_y":
|
||||||
m_regionLocY = (uint) configuration_result;
|
LegacyRegionLocY = (uint) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "internal_ip_address":
|
case "internal_ip_address":
|
||||||
IPAddress address = (IPAddress) configuration_result;
|
IPAddress address = (IPAddress) configuration_result;
|
||||||
|
@ -1000,8 +1036,8 @@ namespace OpenSim.Framework
|
||||||
args["external_host_name"] = OSD.FromString(ExternalHostName);
|
args["external_host_name"] = OSD.FromString(ExternalHostName);
|
||||||
args["http_port"] = OSD.FromString(HttpPort.ToString());
|
args["http_port"] = OSD.FromString(HttpPort.ToString());
|
||||||
args["server_uri"] = OSD.FromString(ServerURI);
|
args["server_uri"] = OSD.FromString(ServerURI);
|
||||||
args["region_xloc"] = OSD.FromString(RegionLocX.ToString());
|
args["region_xloc"] = OSD.FromString(LegacyRegionLocX.ToString());
|
||||||
args["region_yloc"] = OSD.FromString(RegionLocY.ToString());
|
args["region_yloc"] = OSD.FromString(LegacyRegionLocY.ToString());
|
||||||
args["internal_ep_address"] = OSD.FromString(InternalEndPoint.Address.ToString());
|
args["internal_ep_address"] = OSD.FromString(InternalEndPoint.Address.ToString());
|
||||||
args["internal_ep_port"] = OSD.FromString(InternalEndPoint.Port.ToString());
|
args["internal_ep_port"] = OSD.FromString(InternalEndPoint.Port.ToString());
|
||||||
if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
|
if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
|
||||||
|
@ -1032,13 +1068,13 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
uint locx;
|
uint locx;
|
||||||
UInt32.TryParse(args["region_xloc"].AsString(), out locx);
|
UInt32.TryParse(args["region_xloc"].AsString(), out locx);
|
||||||
RegionLocX = locx;
|
LegacyRegionLocX = locx;
|
||||||
}
|
}
|
||||||
if (args["region_yloc"] != null)
|
if (args["region_yloc"] != null)
|
||||||
{
|
{
|
||||||
uint locy;
|
uint locy;
|
||||||
UInt32.TryParse(args["region_yloc"].AsString(), out locy);
|
UInt32.TryParse(args["region_yloc"].AsString(), out locy);
|
||||||
RegionLocY = locy;
|
LegacyRegionLocY = locy;
|
||||||
}
|
}
|
||||||
IPAddress ip_addr = null;
|
IPAddress ip_addr = null;
|
||||||
if (args["internal_ep_address"] != null)
|
if (args["internal_ep_address"] != null)
|
||||||
|
@ -1081,8 +1117,8 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
Dictionary<string, object> kvp = new Dictionary<string, object>();
|
Dictionary<string, object> kvp = new Dictionary<string, object>();
|
||||||
kvp["uuid"] = RegionID.ToString();
|
kvp["uuid"] = RegionID.ToString();
|
||||||
kvp["locX"] = RegionLocX.ToString();
|
kvp["locX"] = LegacyRegionLocX.ToString();
|
||||||
kvp["locY"] = RegionLocY.ToString();
|
kvp["locY"] = LegacyRegionLocY.ToString();
|
||||||
kvp["external_ip_address"] = ExternalEndPoint.Address.ToString();
|
kvp["external_ip_address"] = ExternalEndPoint.Address.ToString();
|
||||||
kvp["external_port"] = ExternalEndPoint.Port.ToString();
|
kvp["external_port"] = ExternalEndPoint.Port.ToString();
|
||||||
kvp["external_host_name"] = ExternalHostName;
|
kvp["external_host_name"] = ExternalHostName;
|
||||||
|
|
|
@ -763,8 +763,8 @@ namespace OpenSim
|
||||||
MainConsole.Instance.Output(String.Format(
|
MainConsole.Instance.Output(String.Format(
|
||||||
"Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}",
|
"Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}",
|
||||||
scene.RegionInfo.RegionName,
|
scene.RegionInfo.RegionName,
|
||||||
scene.RegionInfo.RegionLocX,
|
scene.RegionInfo.LegacyRegionLocX,
|
||||||
scene.RegionInfo.RegionLocY,
|
scene.RegionInfo.LegacyRegionLocY,
|
||||||
scene.RegionInfo.InternalEndPoint.Port,
|
scene.RegionInfo.InternalEndPoint.Port,
|
||||||
scene.RegionInfo.EstateSettings.EstateName));
|
scene.RegionInfo.EstateSettings.EstateName));
|
||||||
});
|
});
|
||||||
|
|
|
@ -742,7 +742,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
|
"[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);
|
ShutdownClientServer(whichRegion);
|
||||||
IScene scene;
|
IScene scene;
|
||||||
|
|
|
@ -2910,8 +2910,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
pos = (land.AABBMax + land.AABBMin) * 0.5f;
|
pos = (land.AABBMax + land.AABBMin) * 0.5f;
|
||||||
}
|
}
|
||||||
reply.Data.GlobalX = info.RegionLocX + x;
|
reply.Data.GlobalX = info.LegacyRegionLocX + x;
|
||||||
reply.Data.GlobalY = info.RegionLocY + y;
|
reply.Data.GlobalY = info.LegacyRegionLocY + y;
|
||||||
reply.Data.GlobalZ = pos.Z;
|
reply.Data.GlobalZ = pos.Z;
|
||||||
reply.Data.SimName = Utils.StringToBytes(info.RegionName);
|
reply.Data.SimName = Utils.StringToBytes(info.RegionName);
|
||||||
reply.Data.SnapshotID = land.SnapshotID;
|
reply.Data.SnapshotID = land.SnapshotID;
|
||||||
|
|
|
@ -180,8 +180,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||||
string message = c.Message;
|
string message = c.Message;
|
||||||
Scene scene = (Scene)c.Scene;
|
Scene scene = (Scene)c.Scene;
|
||||||
Vector3 fromPos = c.Position;
|
Vector3 fromPos = c.Position;
|
||||||
Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
Vector3 regionPos = new Vector3(scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
|
||||||
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
|
||||||
|
|
||||||
if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
|
if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
|
||||||
|
|
||||||
|
@ -333,8 +333,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||||
{
|
{
|
||||||
Vector3 fromRegionPos = fromPos + regionPos;
|
Vector3 fromRegionPos = fromPos + regionPos;
|
||||||
Vector3 toRegionPos = presence.AbsolutePosition +
|
Vector3 toRegionPos = presence.AbsolutePosition +
|
||||||
new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
new Vector3(presence.Scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
|
||||||
presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
presence.Scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
|
||||||
|
|
||||||
int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
|
int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
|
||||||
|
|
||||||
|
|
|
@ -663,8 +663,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
|
||||||
|
|
||||||
Vector3 avaPos = p.AbsolutePosition;
|
Vector3 avaPos = p.AbsolutePosition;
|
||||||
// Getting the global position for the Avatar
|
// Getting the global position for the Avatar
|
||||||
Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.RegionLocX*Constants.RegionSize + avaPos.X,
|
Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.LegacyRegionLocX*Constants.RegionSize + avaPos.X,
|
||||||
remoteClient.Scene.RegionInfo.RegionLocY*Constants.RegionSize + avaPos.Y,
|
remoteClient.Scene.RegionInfo.LegacyRegionLocY*Constants.RegionSize + avaPos.Y,
|
||||||
avaPos.Z);
|
avaPos.Z);
|
||||||
|
|
||||||
string landOwnerName = string.Empty;
|
string landOwnerName = string.Empty;
|
||||||
|
|
|
@ -494,8 +494,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that these are not the same coordinates
|
// Check that these are not the same coordinates
|
||||||
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX &&
|
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.LegacyRegionLocX &&
|
||||||
finalDestination.RegionLocY == sp.Scene.RegionInfo.RegionLocY)
|
finalDestination.RegionLocY == sp.Scene.RegionInfo.LegacyRegionLocY)
|
||||||
{
|
{
|
||||||
// Can't do. Viewer crashes
|
// Can't do. Viewer crashes
|
||||||
sp.ControllingClient.SendTeleportFailed("Space warp! You would crash. Move to a different region and try again.");
|
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);
|
// destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI);
|
||||||
|
|
||||||
// Insanely, RegionLoc on RegionInfo is the 256m map co-ord whilst GridRegion.RegionLoc is the raw meters position.
|
// 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
|
return Math.Abs(sourceRegion.LegacyRegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
|
||||||
&& Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
|
&& Math.Abs(sourceRegion.LegacyRegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -635,7 +635,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
string.Format(
|
string.Format(
|
||||||
"Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way",
|
"Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way",
|
||||||
finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY,
|
finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY,
|
||||||
sourceRegion.RegionName, sourceRegion.RegionLocX, sourceRegion.RegionLocY,
|
sourceRegion.RegionName, sourceRegion.LegacyRegionLocX, sourceRegion.LegacyRegionLocY,
|
||||||
MaxTransferDistance));
|
MaxTransferDistance));
|
||||||
|
|
||||||
return;
|
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);
|
// "[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);
|
Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
|
||||||
uint neighbourx = scene.RegionInfo.RegionLocX;
|
uint neighbourx = scene.RegionInfo.LegacyRegionLocX;
|
||||||
uint neighboury = scene.RegionInfo.RegionLocY;
|
uint neighboury = scene.RegionInfo.LegacyRegionLocY;
|
||||||
const float boundaryDistance = 1.7f;
|
const float boundaryDistance = 1.7f;
|
||||||
Vector3 northCross = new Vector3(0, boundaryDistance, 0);
|
Vector3 northCross = new Vector3(0, boundaryDistance, 0);
|
||||||
Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
|
Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
|
||||||
|
@ -1408,8 +1408,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
neighbourx = b.TriggerRegionX;
|
neighbourx = b.TriggerRegionX;
|
||||||
|
|
||||||
Vector3 newposition = pos;
|
Vector3 newposition = pos;
|
||||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||||
agent.ControllingClient.SendAgentAlertMessage(
|
agent.ControllingClient.SendAgentAlertMessage(
|
||||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||||
|
@ -1431,8 +1431,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
neighbourx = ba.TriggerRegionX;
|
neighbourx = ba.TriggerRegionX;
|
||||||
|
|
||||||
Vector3 newposition = pos;
|
Vector3 newposition = pos;
|
||||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||||
agent.ControllingClient.SendAgentAlertMessage(
|
agent.ControllingClient.SendAgentAlertMessage(
|
||||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||||
|
@ -1462,8 +1462,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
neighboury = ba.TriggerRegionY;
|
neighboury = ba.TriggerRegionY;
|
||||||
neighbourx = ba.TriggerRegionX;
|
neighbourx = ba.TriggerRegionX;
|
||||||
Vector3 newposition = pos;
|
Vector3 newposition = pos;
|
||||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||||
agent.ControllingClient.SendAgentAlertMessage(
|
agent.ControllingClient.SendAgentAlertMessage(
|
||||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||||
|
@ -1492,8 +1492,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
neighboury = b.TriggerRegionY;
|
neighboury = b.TriggerRegionY;
|
||||||
neighbourx = b.TriggerRegionX;
|
neighbourx = b.TriggerRegionX;
|
||||||
Vector3 newposition = pos;
|
Vector3 newposition = pos;
|
||||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||||
agent.ControllingClient.SendAgentAlertMessage(
|
agent.ControllingClient.SendAgentAlertMessage(
|
||||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||||
|
@ -1901,7 +1901,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
if (m_regionInfo != null)
|
if (m_regionInfo != null)
|
||||||
{
|
{
|
||||||
neighbours = RequestNeighbours(sp, m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
|
neighbours = RequestNeighbours(sp, m_regionInfo.LegacyRegionLocX, m_regionInfo.LegacyRegionLocY);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2057,8 +2057,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour)
|
Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour)
|
||||||
{
|
{
|
||||||
int rRegionX = (int)sp.Scene.RegionInfo.RegionLocX;
|
int rRegionX = (int)sp.Scene.RegionInfo.LegacyRegionLocX;
|
||||||
int rRegionY = (int)sp.Scene.RegionInfo.RegionLocY;
|
int rRegionY = (int)sp.Scene.RegionInfo.LegacyRegionLocY;
|
||||||
int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize;
|
int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize;
|
||||||
int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize;
|
int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize;
|
||||||
int shiftx = (rRegionX - tRegionX) * (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.X = ((int)extent.X / (int)Constants.RegionSize);
|
||||||
extent.Y = ((int)extent.Y / (int)Constants.RegionSize);
|
extent.Y = ((int)extent.Y / (int)Constants.RegionSize);
|
||||||
|
|
||||||
swCorner.X = Scene.RegionInfo.RegionLocX - 1;
|
swCorner.X = Scene.RegionInfo.LegacyRegionLocX - 1;
|
||||||
swCorner.Y = Scene.RegionInfo.RegionLocY - 1;
|
swCorner.Y = Scene.RegionInfo.LegacyRegionLocY - 1;
|
||||||
neCorner.X = Scene.RegionInfo.RegionLocX + extent.X;
|
neCorner.X = Scene.RegionInfo.LegacyRegionLocX + extent.X;
|
||||||
neCorner.Y = Scene.RegionInfo.RegionLocY + extent.Y;
|
neCorner.Y = Scene.RegionInfo.LegacyRegionLocY + extent.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2301,8 +2301,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int thisx = (int)scene.RegionInfo.RegionLocX;
|
int thisx = (int)scene.RegionInfo.LegacyRegionLocX;
|
||||||
int thisy = (int)scene.RegionInfo.RegionLocY;
|
int thisy = (int)scene.RegionInfo.LegacyRegionLocY;
|
||||||
Vector3 EastCross = new Vector3(0.1f, 0, 0);
|
Vector3 EastCross = new Vector3(0.1f, 0, 0);
|
||||||
Vector3 WestCross = new Vector3(-0.1f, 0, 0);
|
Vector3 WestCross = new Vector3(-0.1f, 0, 0);
|
||||||
Vector3 NorthCross = new Vector3(0, 0.1f, 0);
|
Vector3 NorthCross = new Vector3(0, 0.1f, 0);
|
||||||
|
|
|
@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
ObjectRegionName = s.RegionInfo.RegionName;
|
ObjectRegionName = s.RegionInfo.RegionName;
|
||||||
uint localX = (s.RegionInfo.RegionLocX * (int)Constants.RegionSize);
|
uint localX = (s.RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize);
|
||||||
uint localY = (s.RegionInfo.RegionLocY * (int)Constants.RegionSize);
|
uint localY = (s.RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize);
|
||||||
ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")";
|
ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")";
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,10 +224,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||||
}
|
}
|
||||||
|
|
||||||
string reason = string.Empty;
|
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}",
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
public void AddScene(Scene scene)
|
public void AddScene(Scene scene)
|
||||||
{
|
{
|
||||||
uint x = scene.RegionInfo.RegionLocX;
|
uint x = scene.RegionInfo.LegacyRegionLocX;
|
||||||
uint y = scene.RegionInfo.RegionLocY;
|
uint y = scene.RegionInfo.LegacyRegionLocY;
|
||||||
|
|
||||||
SortedDictionary<uint, Scene> row;
|
SortedDictionary<uint, Scene> row;
|
||||||
if (!Regions.TryGetValue(y, out 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
|
// We add the region's coordinates to ensure uniqueness even if multiple regions have the same name
|
||||||
string path = string.Format("{0}_{1}_{2}",
|
string path = string.Format("{0}_{1}_{2}",
|
||||||
scene.RegionInfo.RegionLocX - Rect.X + 1,
|
scene.RegionInfo.LegacyRegionLocX - Rect.X + 1,
|
||||||
scene.RegionInfo.RegionLocY - Rect.Y + 1,
|
scene.RegionInfo.LegacyRegionLocY - Rect.Y + 1,
|
||||||
scene.RegionInfo.RegionName.Replace(' ', '_'));
|
scene.RegionInfo.RegionName.Replace(' ', '_'));
|
||||||
m_regionDirs[scene.RegionInfo.RegionID] = path;
|
m_regionDirs[scene.RegionInfo.RegionID] = path;
|
||||||
});
|
});
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
{
|
{
|
||||||
foreach (RegionInfo archivedRegion in m_directory2region.Values)
|
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);
|
location.Offset(archivedRegion.Location);
|
||||||
|
|
||||||
Scene scene;
|
Scene scene;
|
||||||
|
|
|
@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
|
int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
|
||||||
int y = (args.Length > 6 ? int.Parse(args[6]) : -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);
|
int corner = int.Parse(num);
|
||||||
UUID texture = UUID.Parse(uuid);
|
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 x = (args.Length > 4 ? int.Parse(args[4]) : -1);
|
||||||
int y = (args.Length > 5 ? int.Parse(args[5]) : -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);
|
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 x = (args.Length > 6 ? int.Parse(args[6]) : -1);
|
||||||
int y = (args.Length > 7 ? int.Parse(args[7]) : -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);
|
int corner = int.Parse(num);
|
||||||
float lowValue = float.Parse(min, Culture.NumberFormatInfo);
|
float lowValue = float.Parse(min, Culture.NumberFormatInfo);
|
||||||
|
|
|
@ -1717,8 +1717,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
// HACK for now
|
// HACK for now
|
||||||
RegionInfo r = new RegionInfo();
|
RegionInfo r = new RegionInfo();
|
||||||
r.RegionName = info.RegionName;
|
r.RegionName = info.RegionName;
|
||||||
r.RegionLocX = (uint)info.RegionLocX;
|
r.LegacyRegionLocX = (uint)info.RegionLocX;
|
||||||
r.RegionLocY = (uint)info.RegionLocY;
|
r.LegacyRegionLocY = (uint)info.RegionLocY;
|
||||||
r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess);
|
r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess);
|
||||||
remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y);
|
remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -553,8 +553,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
/// <param name="fileStartY">Where to begin our slice</param>
|
/// <param name="fileStartY">Where to begin our slice</param>
|
||||||
public void LoadFromFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
|
public void LoadFromFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
|
||||||
{
|
{
|
||||||
int offsetX = (int) m_scene.RegionInfo.RegionLocX - fileStartX;
|
int offsetX = (int) m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
|
||||||
int offsetY = (int) m_scene.RegionInfo.RegionLocY - fileStartY;
|
int offsetY = (int) m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
|
||||||
|
|
||||||
if (offsetX >= 0 && offsetX < fileWidth && offsetY >= 0 && offsetY < fileHeight)
|
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>
|
/// <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)
|
public void SaveToFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
|
||||||
{
|
{
|
||||||
int offsetX = (int)m_scene.RegionInfo.RegionLocX - fileStartX;
|
int offsetX = (int)m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
|
||||||
int offsetY = (int)m_scene.RegionInfo.RegionLocY - fileStartY;
|
int offsetY = (int)m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
|
||||||
|
|
||||||
if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight)
|
if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
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.",
|
"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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
// 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.
|
// 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;
|
ScenePresence avatarPresence = null;
|
||||||
|
|
||||||
|
@ -269,10 +269,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
|
List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
|
||||||
|
|
||||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||||
(int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize,
|
(int)(m_scene.RegionInfo.LegacyRegionLocX - 8) * (int)Constants.RegionSize,
|
||||||
(int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize,
|
(int)(m_scene.RegionInfo.LegacyRegionLocX + 8) * (int)Constants.RegionSize,
|
||||||
(int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize,
|
(int)(m_scene.RegionInfo.LegacyRegionLocY - 8) * (int)Constants.RegionSize,
|
||||||
(int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize);
|
(int)(m_scene.RegionInfo.LegacyRegionLocY + 8) * (int)Constants.RegionSize);
|
||||||
foreach (GridRegion r in regions)
|
foreach (GridRegion r in regions)
|
||||||
{
|
{
|
||||||
MapBlockData block = new MapBlockData();
|
MapBlockData block = new MapBlockData();
|
||||||
|
@ -1199,10 +1199,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
List<MapBlockData> mapBlocks = new List<MapBlockData>();
|
List<MapBlockData> mapBlocks = new List<MapBlockData>();
|
||||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||||
(int)(m_scene.RegionInfo.RegionLocX - 9) * (int)Constants.RegionSize,
|
(int)(m_scene.RegionInfo.LegacyRegionLocX - 9) * (int)Constants.RegionSize,
|
||||||
(int)(m_scene.RegionInfo.RegionLocX + 9) * (int)Constants.RegionSize,
|
(int)(m_scene.RegionInfo.LegacyRegionLocX + 9) * (int)Constants.RegionSize,
|
||||||
(int)(m_scene.RegionInfo.RegionLocY - 9) * (int)Constants.RegionSize,
|
(int)(m_scene.RegionInfo.LegacyRegionLocY - 9) * (int)Constants.RegionSize,
|
||||||
(int)(m_scene.RegionInfo.RegionLocY + 9) * (int)Constants.RegionSize);
|
(int)(m_scene.RegionInfo.LegacyRegionLocY + 9) * (int)Constants.RegionSize);
|
||||||
List<AssetBase> textures = new List<AssetBase>();
|
List<AssetBase> textures = new List<AssetBase>();
|
||||||
List<Image> bitImages = new List<Image>();
|
List<Image> bitImages = new List<Image>();
|
||||||
|
|
||||||
|
@ -1243,8 +1243,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
for (int i = 0; i < mapBlocks.Count; i++)
|
for (int i = 0; i < mapBlocks.Count; i++)
|
||||||
{
|
{
|
||||||
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.RegionLocX) + 10);
|
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.LegacyRegionLocX) + 10);
|
||||||
ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.RegionLocY) + 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
|
g.DrawImage(bitImages[i], (x * 128), 2560 - (y * 128), 128, 128); // y origin is top
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1107,8 +1107,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
|
||||||
{
|
{
|
||||||
// If these are cast to INT because long + negative values + abs returns invalid data
|
// If these are cast to INT because long + negative values + abs returns invalid data
|
||||||
int resultX = Math.Abs((int)xcell - (int)RegionInfo.RegionLocX);
|
int resultX = Math.Abs((int)xcell - (int)RegionInfo.LegacyRegionLocX);
|
||||||
int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY);
|
int resultY = Math.Abs((int)ycell - (int)RegionInfo.LegacyRegionLocY);
|
||||||
if (resultX <= 1 && resultY <= 1)
|
if (resultX <= 1 && resultY <= 1)
|
||||||
{
|
{
|
||||||
// Let the grid service module know, so this can be cached
|
// Let the grid service module know, so this can be cached
|
||||||
|
@ -1183,8 +1183,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public int HaveNeighbor(Cardinals car, ref int[] fix)
|
public int HaveNeighbor(Cardinals car, ref int[] fix)
|
||||||
{
|
{
|
||||||
uint neighbourx = RegionInfo.RegionLocX;
|
uint neighbourx = RegionInfo.LegacyRegionLocX;
|
||||||
uint neighboury = RegionInfo.RegionLocY;
|
uint neighboury = RegionInfo.LegacyRegionLocY;
|
||||||
|
|
||||||
int dir = (int)car;
|
int dir = (int)car;
|
||||||
|
|
||||||
|
@ -1204,8 +1204,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (neighbourRegion == null)
|
if (neighbourRegion == null)
|
||||||
{
|
{
|
||||||
fix[0] = (int)(RegionInfo.RegionLocX - neighbourx);
|
fix[0] = (int)(RegionInfo.LegacyRegionLocX - neighbourx);
|
||||||
fix[1] = (int)(RegionInfo.RegionLocY - neighboury);
|
fix[1] = (int)(RegionInfo.LegacyRegionLocY - neighboury);
|
||||||
return dir * (-1);
|
return dir * (-1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4371,8 +4371,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
uint rRegionX = (uint)(cAgentData.RegionHandle >> 40);
|
uint rRegionX = (uint)(cAgentData.RegionHandle >> 40);
|
||||||
uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8);
|
uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8);
|
||||||
uint tRegionX = RegionInfo.RegionLocX;
|
uint tRegionX = RegionInfo.LegacyRegionLocX;
|
||||||
uint tRegionY = RegionInfo.RegionLocY;
|
uint tRegionY = RegionInfo.LegacyRegionLocY;
|
||||||
//Send Data to ScenePresence
|
//Send Data to ScenePresence
|
||||||
childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY);
|
childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY);
|
||||||
// Not Implemented:
|
// Not Implemented:
|
||||||
|
@ -4600,13 +4600,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScenePresence sp = GetScenePresence(remoteClient.AgentId);
|
ScenePresence sp = GetScenePresence(remoteClient.AgentId);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
{
|
||||||
uint regionX = RegionInfo.RegionLocX;
|
uint regionX = RegionInfo.LegacyRegionLocX;
|
||||||
uint regionY = RegionInfo.RegionLocY;
|
uint regionY = RegionInfo.LegacyRegionLocY;
|
||||||
|
|
||||||
Utils.LongToUInts(regionHandle, out regionX, out regionY);
|
Utils.LongToUInts(regionHandle, out regionX, out regionY);
|
||||||
|
|
||||||
int shiftx = (int) regionX - (int) RegionInfo.RegionLocX * (int)Constants.RegionSize;
|
int shiftx = (int) regionX - (int) RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize;
|
||||||
int shifty = (int) regionY - (int) RegionInfo.RegionLocY * (int)Constants.RegionSize;
|
int shifty = (int) regionY - (int) RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize;
|
||||||
|
|
||||||
position.X += shiftx;
|
position.X += shiftx;
|
||||||
position.Y += shifty;
|
position.Y += shifty;
|
||||||
|
|
|
@ -445,8 +445,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
foreach (Scene mscene in m_localScenes)
|
foreach (Scene mscene in m_localScenes)
|
||||||
{
|
{
|
||||||
if (mscene.RegionInfo.RegionLocX == locX &&
|
if (mscene.RegionInfo.LegacyRegionLocX == locX &&
|
||||||
mscene.RegionInfo.RegionLocY == locY)
|
mscene.RegionInfo.LegacyRegionLocY == locY)
|
||||||
{
|
{
|
||||||
scene = mscene;
|
scene = mscene;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -710,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Utils.LongToUInts(handle, out x, out y);
|
Utils.LongToUInts(handle, out x, out y);
|
||||||
x = x / Constants.RegionSize;
|
x = x / Constants.RegionSize;
|
||||||
y = y / 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);
|
old.Add(handle);
|
||||||
}
|
}
|
||||||
|
@ -2094,8 +2094,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Get terrain height for sub-region in a megaregion if necessary
|
// Get terrain height for sub-region in a megaregion if necessary
|
||||||
int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X);
|
int X = (int)((m_scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize) + pos.X);
|
||||||
int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y);
|
int Y = (int)((m_scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize) + pos.Y);
|
||||||
GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, 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 X and Y is NaN, target_region will be null
|
||||||
if (target_region == null)
|
if (target_region == null)
|
||||||
|
|
|
@ -437,7 +437,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
SimStats simStats
|
SimStats simStats
|
||||||
= new 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);
|
rb, sb, m_scene.RegionInfo.originRegionID);
|
||||||
|
|
||||||
handlerSendStatResult = OnSendStatsResult;
|
handlerSendStatResult = OnSendStatsResult;
|
||||||
|
|
|
@ -84,8 +84,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
|
||||||
|
|
||||||
Region = scene.RegionInfo.RegionName;
|
Region = scene.RegionInfo.RegionName;
|
||||||
Host = scene.RegionInfo.ExternalHostName;
|
Host = scene.RegionInfo.ExternalHostName;
|
||||||
LocX = Convert.ToString(scene.RegionInfo.RegionLocX);
|
LocX = Convert.ToString(scene.RegionInfo.LegacyRegionLocX);
|
||||||
LocY = Convert.ToString(scene.RegionInfo.RegionLocY);
|
LocY = Convert.ToString(scene.RegionInfo.LegacyRegionLocY);
|
||||||
IDK = Convert.ToString(_idk_++);
|
IDK = Convert.ToString(_idk_++);
|
||||||
|
|
||||||
showAlert = config.GetBoolean("alert_show", false);
|
showAlert = config.GetBoolean("alert_show", false);
|
||||||
|
|
|
@ -100,8 +100,8 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem,
|
UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem,
|
||||||
UUID fromtaskid)
|
UUID fromtaskid)
|
||||||
{
|
{
|
||||||
int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
|
int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
|
||||||
int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
|
int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
|
||||||
rayend.X += differenceX * (int)Constants.RegionSize;
|
rayend.X += differenceX * (int)Constants.RegionSize;
|
||||||
rayend.Y += differenceY * (int)Constants.RegionSize;
|
rayend.Y += differenceY * (int)Constants.RegionSize;
|
||||||
raystart.X += differenceX * (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,
|
PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid,
|
||||||
byte rayendisintersection)
|
byte rayendisintersection)
|
||||||
{
|
{
|
||||||
int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
|
int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
|
||||||
int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
|
int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
|
||||||
rayend.X += differenceX * (int)Constants.RegionSize;
|
rayend.X += differenceX * (int)Constants.RegionSize;
|
||||||
rayend.Y += differenceY * (int)Constants.RegionSize;
|
rayend.Y += differenceY * (int)Constants.RegionSize;
|
||||||
raystart.X += differenceX * (int)Constants.RegionSize;
|
raystart.X += differenceX * (int)Constants.RegionSize;
|
||||||
|
|
|
@ -246,8 +246,8 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
newConn.RegionScene = scene;
|
newConn.RegionScene = scene;
|
||||||
newConn.RegionLandChannel = scene.LandChannel;
|
newConn.RegionLandChannel = scene.LandChannel;
|
||||||
newConn.RegionId = scene.RegionInfo.originRegionID;
|
newConn.RegionId = scene.RegionInfo.originRegionID;
|
||||||
newConn.X = scene.RegionInfo.RegionLocX;
|
newConn.X = scene.RegionInfo.LegacyRegionLocX;
|
||||||
newConn.Y = scene.RegionInfo.RegionLocY;
|
newConn.Y = scene.RegionInfo.LegacyRegionLocY;
|
||||||
newConn.XEnd = (int)Constants.RegionSize;
|
newConn.XEnd = (int)Constants.RegionSize;
|
||||||
newConn.YEnd = (int)Constants.RegionSize;
|
newConn.YEnd = (int)Constants.RegionSize;
|
||||||
|
|
||||||
|
@ -502,11 +502,11 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
|
|
||||||
lock (scene.WestBorders)
|
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
|
// Trigger auto teleport to root region
|
||||||
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
|
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
|
||||||
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
|
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset Terrain.. since terrain loads before we get here, we need to load
|
// Reset Terrain.. since terrain loads before we get here, we need to load
|
||||||
|
@ -564,9 +564,9 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
|
|
||||||
lock (scene.SouthBorders)
|
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].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocY - rootConn.RegionScene.RegionInfo.LegacyRegionLocY) * (int)Constants.RegionSize); //auto teleport south
|
||||||
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
|
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
|
||||||
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
|
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset Terrain.. since terrain normally loads first.
|
// Reset Terrain.. since terrain normally loads first.
|
||||||
|
@ -636,9 +636,9 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
|
|
||||||
lock (scene.SouthBorders)
|
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].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocY - rootConn.RegionScene.RegionInfo.LegacyRegionLocY) * (int)Constants.RegionSize); //auto teleport south
|
||||||
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
|
scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
|
||||||
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
|
scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (rootConn.RegionScene.EastBorders)
|
lock (rootConn.RegionScene.EastBorders)
|
||||||
|
@ -657,9 +657,9 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
|
|
||||||
lock (scene.WestBorders)
|
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
|
||||||
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX;
|
scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
|
||||||
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY;
|
scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -4242,8 +4242,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_item.ItemID, item.AssetID.ToString());
|
m_item.ItemID, item.AssetID.ToString());
|
||||||
|
|
||||||
Vector3 region = new Vector3(
|
Vector3 region = new Vector3(
|
||||||
World.RegionInfo.RegionLocX * Constants.RegionSize,
|
World.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
|
||||||
World.RegionInfo.RegionLocY * Constants.RegionSize,
|
World.RegionInfo.LegacyRegionLocY * Constants.RegionSize,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
World.AssetService.Get(item.AssetID.ToString(), this,
|
World.AssetService.Get(item.AssetID.ToString(), this,
|
||||||
|
@ -5478,7 +5478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_Vector llGetRegionCorner()
|
public LSL_Vector llGetRegionCorner()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
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>
|
/// <summary>
|
||||||
|
@ -5651,8 +5651,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
|
List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
|
||||||
|
|
||||||
uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x;
|
uint neighborX = World.RegionInfo.LegacyRegionLocX + (uint)dir.x;
|
||||||
uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y;
|
uint neighborY = World.RegionInfo.LegacyRegionLocY + (uint)dir.y;
|
||||||
|
|
||||||
foreach (GridRegion sri in neighbors)
|
foreach (GridRegion sri in neighbors)
|
||||||
{
|
{
|
||||||
|
@ -10737,7 +10737,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
httpHeaders["X-SecondLife-Shard"] = shard;
|
httpHeaders["X-SecondLife-Shard"] = shard;
|
||||||
httpHeaders["X-SecondLife-Object-Name"] = m_host.Name;
|
httpHeaders["X-SecondLife-Object-Name"] = m_host.Name;
|
||||||
httpHeaders["X-SecondLife-Object-Key"] = m_host.UUID.ToString();
|
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-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-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);
|
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);
|
||||||
|
|
|
@ -201,8 +201,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
NameValueCollection requestArgs = new NameValueCollection
|
NameValueCollection requestArgs = new NameValueCollection
|
||||||
{
|
{
|
||||||
{ "RequestMethod", "xAddMapTile" },
|
{ "RequestMethod", "xAddMapTile" },
|
||||||
{ "X", scene.RegionInfo.RegionLocX.ToString() },
|
{ "X", scene.RegionInfo.LegacyRegionLocX.ToString() },
|
||||||
{ "Y", scene.RegionInfo.RegionLocY.ToString() },
|
{ "Y", scene.RegionInfo.LegacyRegionLocY.ToString() },
|
||||||
{ "ContentType", "image/png" },
|
{ "ContentType", "image/png" },
|
||||||
{ "EncodedData", System.Convert.ToBase64String(pngData) }
|
{ "EncodedData", System.Convert.ToBase64String(pngData) }
|
||||||
};
|
};
|
||||||
|
|
|
@ -246,8 +246,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
public GridRegion(RegionInfo ConvertFrom)
|
public GridRegion(RegionInfo ConvertFrom)
|
||||||
{
|
{
|
||||||
m_regionName = ConvertFrom.RegionName;
|
m_regionName = ConvertFrom.RegionName;
|
||||||
m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize);
|
m_regionLocX = (int)(ConvertFrom.LegacyRegionLocX * Constants.RegionSize);
|
||||||
m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize);
|
m_regionLocY = (int)(ConvertFrom.LegacyRegionLocY * Constants.RegionSize);
|
||||||
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
||||||
m_externalHostName = ConvertFrom.ExternalHostName;
|
m_externalHostName = ConvertFrom.ExternalHostName;
|
||||||
m_httpPort = ConvertFrom.HttpPort;
|
m_httpPort = ConvertFrom.HttpPort;
|
||||||
|
|
Loading…
Reference in New Issue