aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert Adams2013-09-19 12:14:21 -0700
committerRobert Adams2013-09-25 17:30:45 -0700
commit96abbbb6fbab56e29c8a8af6974ef1df90e45ddf (patch)
treea077759f6c3563ef86c13f7a06fae549f4577b4b
parentminor: Comment out windlight log message about sending scene data for now. (diff)
downloadopensim-SC_OLD-96abbbb6fbab56e29c8a8af6974ef1df90e45ddf.zip
opensim-SC_OLD-96abbbb6fbab56e29c8a8af6974ef1df90e45ddf.tar.gz
opensim-SC_OLD-96abbbb6fbab56e29c8a8af6974ef1df90e45ddf.tar.bz2
opensim-SC_OLD-96abbbb6fbab56e29c8a8af6974ef1df90e45ddf.tar.xz
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.
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs4
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs20
-rw-r--r--OpenSim/Data/Tests/RegionTests.cs8
-rw-r--r--OpenSim/Framework/RegionInfo.cs82
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs48
-rw-r--r--OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs22
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs4
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs8
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs28
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs4
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs4
28 files changed, 191 insertions, 155 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index 1d63d26..74a7a50 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -184,11 +184,11 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
184 return false; 184 return false;
185 } 185 }
186 else if ( 186 else if (
187 regions[i].RegionLocX == regions[j].RegionLocX && regions[i].RegionLocY == regions[j].RegionLocY) 187 regions[i].LegacyRegionLocX == regions[j].LegacyRegionLocX && regions[i].LegacyRegionLocY == regions[j].LegacyRegionLocY)
188 { 188 {
189 m_log.ErrorFormat( 189 m_log.ErrorFormat(
190 "[LOAD REGIONS PLUGIN]: Regions {0} and {1} have the same grid location ({2}, {3})", 190 "[LOAD REGIONS PLUGIN]: Regions {0} and {1} have the same grid location ({2}, {3})",
191 regions[i].RegionName, regions[j].RegionName, regions[i].RegionLocX, regions[i].RegionLocY); 191 regions[i].RegionName, regions[j].RegionName, regions[i].LegacyRegionLocX, regions[i].LegacyRegionLocY);
192 return false; 192 return false;
193 } 193 }
194 else if (regions[i].InternalEndPoint.Port == regions[j].InternalEndPoint.Port) 194 else if (regions[i].InternalEndPoint.Port == regions[j].InternalEndPoint.Port)
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index c78cf3b..7afdd34 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -542,7 +542,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
542 throw new Exception( 542 throw new Exception(
543 String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>", 543 String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>",
544 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, 544 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
545 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); 545 scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
546 } 546 }
547 else 547 else
548 { 548 {
@@ -556,8 +556,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
556 region.RegionID = regionID; 556 region.RegionID = regionID;
557 region.originRegionID = regionID; 557 region.originRegionID = regionID;
558 region.RegionName = (string) requestData["region_name"]; 558 region.RegionName = (string) requestData["region_name"];
559 region.RegionLocX = Convert.ToUInt32(requestData["region_x"]); 559 region.LegacyRegionLocX = Convert.ToUInt32(requestData["region_x"]);
560 region.RegionLocY = Convert.ToUInt32(requestData["region_y"]); 560 region.LegacyRegionLocY = Convert.ToUInt32(requestData["region_y"]);
561 561
562 // check for collisions: region name, region UUID, 562 // check for collisions: region name, region UUID,
563 // region location 563 // region location
@@ -565,14 +565,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
565 throw new Exception( 565 throw new Exception(
566 String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>", 566 String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>",
567 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, 567 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
568 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); 568 scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
569 569
570 if (m_application.SceneManager.TryGetScene(region.RegionLocX, region.RegionLocY, out scene)) 570 if (m_application.SceneManager.TryGetScene(region.LegacyRegionLocX, region.LegacyRegionLocY, out scene))
571 throw new Exception( 571 throw new Exception(
572 String.Format("region location <{0},{1}> already in use by region {2}, UUID {3}, <{4},{5}>", 572 String.Format("region location <{0},{1}> already in use by region {2}, UUID {3}, <{4},{5}>",
573 region.RegionLocX, region.RegionLocY, 573 region.LegacyRegionLocX, region.LegacyRegionLocY,
574 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, 574 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
575 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); 575 scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
576 576
577 region.InternalEndPoint = 577 region.InternalEndPoint =
578 new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0); 578 new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0);
@@ -586,7 +586,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
586 region.InternalEndPoint.Address, 586 region.InternalEndPoint.Address,
587 region.InternalEndPoint.Port, 587 region.InternalEndPoint.Port,
588 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, 588 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
589 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); 589 scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY));
590 590
591 region.ExternalHostName = (string) requestData["external_address"]; 591 region.ExternalHostName = (string) requestData["external_address"];
592 592
@@ -625,8 +625,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
625 String.Format( 625 String.Format(
626 m_config.GetString("region_file_template", 626 m_config.GetString("region_file_template",
627 "{0}x{1}-{2}.ini"), 627 "{0}x{1}-{2}.ini"),
628 region.RegionLocX.ToString(), 628 region.LegacyRegionLocX.ToString(),
629 region.RegionLocY.ToString(), 629 region.LegacyRegionLocY.ToString(),
630 regionID.ToString(), 630 regionID.ToString(),
631 region.InternalEndPoint.Port.ToString(), 631 region.InternalEndPoint.Port.ToString(),
632 region.RegionName.Replace(" ", "_").Replace(":", "_"). 632 region.RegionName.Replace(" ", "_").Replace(":", "_").
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs
index dbed8f6..b4989d1 100644
--- a/OpenSim/Data/Tests/RegionTests.cs
+++ b/OpenSim/Data/Tests/RegionTests.cs
@@ -300,8 +300,8 @@ namespace OpenSim.Data.Tests
300 300
301 RegionInfo regionInfo = new RegionInfo(); 301 RegionInfo regionInfo = new RegionInfo();
302 regionInfo.RegionID = region3; 302 regionInfo.RegionID = region3;
303 regionInfo.RegionLocX = 0; 303 regionInfo.LegacyRegionLocX = 0;
304 regionInfo.RegionLocY = 0; 304 regionInfo.LegacyRegionLocY = 0;
305 305
306 SceneObjectPart sop = new SceneObjectPart(); 306 SceneObjectPart sop = new SceneObjectPart();
307 SceneObjectGroup sog = new SceneObjectGroup(sop); 307 SceneObjectGroup sog = new SceneObjectGroup(sop);
@@ -1066,8 +1066,8 @@ namespace OpenSim.Data.Tests
1066 { 1066 {
1067 RegionInfo regionInfo = new RegionInfo(); 1067 RegionInfo regionInfo = new RegionInfo();
1068 regionInfo.RegionID = regionId; 1068 regionInfo.RegionID = regionId;
1069 regionInfo.RegionLocX = 0; 1069 regionInfo.LegacyRegionLocX = 0;
1070 regionInfo.RegionLocY = 0; 1070 regionInfo.LegacyRegionLocY = 0;
1071 1071
1072 SceneObjectPart sop = new SceneObjectPart(); 1072 SceneObjectPart sop = new SceneObjectPart();
1073 sop.Name = name; 1073 sop.Name = name;
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 24b9c89..255c8e0 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -137,8 +137,8 @@ namespace OpenSim.Framework
137 public bool m_allow_alternate_ports; 137 public bool m_allow_alternate_ports;
138 protected string m_externalHostName; 138 protected string m_externalHostName;
139 protected IPEndPoint m_internalEndPoint; 139 protected IPEndPoint m_internalEndPoint;
140 protected uint? m_regionLocX; 140 public uint RegionWorldLocX { get; set; }
141 protected uint? m_regionLocY; 141 public uint RegionWorldLocY { get; set; }
142 protected uint m_remotingPort; 142 protected uint m_remotingPort;
143 public UUID RegionID = UUID.Zero; 143 public UUID RegionID = UUID.Zero;
144 public string RemotingAddress; 144 public string RemotingAddress;
@@ -147,6 +147,11 @@ namespace OpenSim.Framework
147 147
148 private Dictionary<String, String> m_otherSettings = new Dictionary<string, string>(); 148 private Dictionary<String, String> m_otherSettings = new Dictionary<string, string>();
149 149
150 // Originally, regions were fixed size of 256 in X and Y.
151 // For downward compatability, 'RegionLocX' returns the region coordinates in the legacy region units.
152 // This is the constant used to convert world integer coordinates to legacy region units.
153 public const uint LegacyRegionSize = 256;
154
150 155
151 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. 156 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
152 157
@@ -229,10 +234,10 @@ namespace OpenSim.Framework
229 m_serverURI = string.Empty; 234 m_serverURI = string.Empty;
230 } 235 }
231 236
232 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 237 public RegionInfo(uint legacyRegionLocX, uint legacyRegionLocY, IPEndPoint internalEndPoint, string externalUri)
233 { 238 {
234 m_regionLocX = regionLocX; 239 RegionWorldLocX = legacyRegionLocX * LegacyRegionSize;
235 m_regionLocY = regionLocY; 240 RegionWorldLocY = legacyRegionLocY * LegacyRegionSize;
236 241
237 m_internalEndPoint = internalEndPoint; 242 m_internalEndPoint = internalEndPoint;
238 m_externalHostName = externalUri; 243 m_externalHostName = externalUri;
@@ -447,25 +452,56 @@ namespace OpenSim.Framework
447 452
448 /// <summary> 453 /// <summary>
449 /// The x co-ordinate of this region in map tiles (e.g. 1000). 454 /// The x co-ordinate of this region in map tiles (e.g. 1000).
455 /// Coordinate is scaled as world coordinates divided by the legacy region size
456 /// and is thus is the number of legacy regions.
457 /// </summary>
458 public uint LegacyRegionLocX
459 {
460 get { return RegionWorldLocX / LegacyRegionSize; }
461 set { RegionWorldLocX = value * LegacyRegionSize; }
462 }
463
464 /// <summary>
465 /// The y co-ordinate of this region in map tiles (e.g. 1000).
466 /// Coordinate is scaled as world coordinates divided by the legacy region size
467 /// and is thus is the number of legacy regions.
468 /// </summary>
469 public uint LegacyRegionLocY
470 {
471 get { return RegionWorldLocY / LegacyRegionSize; }
472 set { RegionWorldLocY = value * LegacyRegionSize; }
473 }
474
475 /// <summary>
476 /// The x co-ordinate of this region in map tiles (e.g. 1000).
477 /// Coordinate is scaled as world coordinates divided by the legacy region size
478 /// and is thus is the number of legacy regions.
479 /// This entrypoint exists for downward compatability for external modules.
450 /// </summary> 480 /// </summary>
451 public uint RegionLocX 481 public uint RegionLocX
452 { 482 {
453 get { return m_regionLocX.Value; } 483 get { return LegacyRegionLocX; }
454 set { m_regionLocX = value; } 484 set { LegacyRegionLocX = value; }
455 } 485 }
456 486
457 /// <summary> 487 /// <summary>
458 /// The y co-ordinate of this region in map tiles (e.g. 1000). 488 /// The y co-ordinate of this region in map tiles (e.g. 1000).
489 /// Coordinate is scaled as world coordinates divided by the legacy region size
490 /// and is thus is the number of legacy regions.
491 /// This entrypoint exists for downward compatability for external modules.
459 /// </summary> 492 /// </summary>
460 public uint RegionLocY 493 public uint RegionLocY
461 { 494 {
462 get { return m_regionLocY.Value; } 495 get { return LegacyRegionLocY; }
463 set { m_regionLocY = value; } 496 set { LegacyRegionLocY = value; }
464 } 497 }
465 498
499 // A unique region handle is created from the region's world coordinates.
500 // This cannot be changed because some code expects to receive the region handle and then
501 // compute the region coordinates from it.
466 public ulong RegionHandle 502 public ulong RegionHandle
467 { 503 {
468 get { return Util.UIntsToLong((RegionLocX * (uint) Constants.RegionSize), (RegionLocY * (uint) Constants.RegionSize)); } 504 get { return Util.UIntsToLong(RegionWorldLocX, RegionWorldLocY); }
469 } 505 }
470 506
471 public void SetEndPoint(string ipaddr, int port) 507 public void SetEndPoint(string ipaddr, int port)
@@ -572,8 +608,8 @@ namespace OpenSim.Framework
572 608
573 string[] locationElements = location.Split(new char[] {','}); 609 string[] locationElements = location.Split(new char[] {','});
574 610
575 m_regionLocX = Convert.ToUInt32(locationElements[0]); 611 LegacyRegionLocX = Convert.ToUInt32(locationElements[0]);
576 m_regionLocY = Convert.ToUInt32(locationElements[1]); 612 LegacyRegionLocY = Convert.ToUInt32(locationElements[1]);
577 613
578 // InternalAddress 614 // InternalAddress
579 // 615 //
@@ -704,7 +740,7 @@ namespace OpenSim.Framework
704 740
705 config.Set("RegionUUID", RegionID.ToString()); 741 config.Set("RegionUUID", RegionID.ToString());
706 742
707 string location = String.Format("{0},{1}", m_regionLocX, m_regionLocY); 743 string location = String.Format("{0},{1}", LegacyRegionLocX, LegacyRegionLocY);
708 config.Set("Location", location); 744 config.Set("Location", location);
709 745
710 config.Set("InternalAddress", m_internalEndPoint.Address.ToString()); 746 config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
@@ -790,9 +826,9 @@ namespace OpenSim.Framework
790 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 826 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
791 "Region Name", RegionName, true); 827 "Region Name", RegionName, true);
792 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 828 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
793 "Grid Location (X Axis)", m_regionLocX.ToString(), true); 829 "Grid Location (X Axis)", LegacyRegionLocX.ToString(), true);
794 configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 830 configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
795 "Grid Location (Y Axis)", m_regionLocY.ToString(), true); 831 "Grid Location (Y Axis)", LegacyRegionLocY.ToString(), true);
796 //m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false); 832 //m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
797 configMember.addConfigurationOption("internal_ip_address", 833 configMember.addConfigurationOption("internal_ip_address",
798 ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, 834 ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
@@ -916,10 +952,10 @@ namespace OpenSim.Framework
916 RegionName = (string) configuration_result; 952 RegionName = (string) configuration_result;
917 break; 953 break;
918 case "sim_location_x": 954 case "sim_location_x":
919 m_regionLocX = (uint) configuration_result; 955 LegacyRegionLocX = (uint) configuration_result;
920 break; 956 break;
921 case "sim_location_y": 957 case "sim_location_y":
922 m_regionLocY = (uint) configuration_result; 958 LegacyRegionLocY = (uint) configuration_result;
923 break; 959 break;
924 case "internal_ip_address": 960 case "internal_ip_address":
925 IPAddress address = (IPAddress) configuration_result; 961 IPAddress address = (IPAddress) configuration_result;
@@ -1000,8 +1036,8 @@ namespace OpenSim.Framework
1000 args["external_host_name"] = OSD.FromString(ExternalHostName); 1036 args["external_host_name"] = OSD.FromString(ExternalHostName);
1001 args["http_port"] = OSD.FromString(HttpPort.ToString()); 1037 args["http_port"] = OSD.FromString(HttpPort.ToString());
1002 args["server_uri"] = OSD.FromString(ServerURI); 1038 args["server_uri"] = OSD.FromString(ServerURI);
1003 args["region_xloc"] = OSD.FromString(RegionLocX.ToString()); 1039 args["region_xloc"] = OSD.FromString(LegacyRegionLocX.ToString());
1004 args["region_yloc"] = OSD.FromString(RegionLocY.ToString()); 1040 args["region_yloc"] = OSD.FromString(LegacyRegionLocY.ToString());
1005 args["internal_ep_address"] = OSD.FromString(InternalEndPoint.Address.ToString()); 1041 args["internal_ep_address"] = OSD.FromString(InternalEndPoint.Address.ToString());
1006 args["internal_ep_port"] = OSD.FromString(InternalEndPoint.Port.ToString()); 1042 args["internal_ep_port"] = OSD.FromString(InternalEndPoint.Port.ToString());
1007 if ((RemotingAddress != null) && !RemotingAddress.Equals("")) 1043 if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
@@ -1032,13 +1068,13 @@ namespace OpenSim.Framework
1032 { 1068 {
1033 uint locx; 1069 uint locx;
1034 UInt32.TryParse(args["region_xloc"].AsString(), out locx); 1070 UInt32.TryParse(args["region_xloc"].AsString(), out locx);
1035 RegionLocX = locx; 1071 LegacyRegionLocX = locx;
1036 } 1072 }
1037 if (args["region_yloc"] != null) 1073 if (args["region_yloc"] != null)
1038 { 1074 {
1039 uint locy; 1075 uint locy;
1040 UInt32.TryParse(args["region_yloc"].AsString(), out locy); 1076 UInt32.TryParse(args["region_yloc"].AsString(), out locy);
1041 RegionLocY = locy; 1077 LegacyRegionLocY = locy;
1042 } 1078 }
1043 IPAddress ip_addr = null; 1079 IPAddress ip_addr = null;
1044 if (args["internal_ep_address"] != null) 1080 if (args["internal_ep_address"] != null)
@@ -1081,8 +1117,8 @@ namespace OpenSim.Framework
1081 { 1117 {
1082 Dictionary<string, object> kvp = new Dictionary<string, object>(); 1118 Dictionary<string, object> kvp = new Dictionary<string, object>();
1083 kvp["uuid"] = RegionID.ToString(); 1119 kvp["uuid"] = RegionID.ToString();
1084 kvp["locX"] = RegionLocX.ToString(); 1120 kvp["locX"] = LegacyRegionLocX.ToString();
1085 kvp["locY"] = RegionLocY.ToString(); 1121 kvp["locY"] = LegacyRegionLocY.ToString();
1086 kvp["external_ip_address"] = ExternalEndPoint.Address.ToString(); 1122 kvp["external_ip_address"] = ExternalEndPoint.Address.ToString();
1087 kvp["external_port"] = ExternalEndPoint.Port.ToString(); 1123 kvp["external_port"] = ExternalEndPoint.Port.ToString();
1088 kvp["external_host_name"] = ExternalHostName; 1124 kvp["external_host_name"] = ExternalHostName;
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 1cdd868..f16b40d 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -763,8 +763,8 @@ namespace OpenSim
763 MainConsole.Instance.Output(String.Format( 763 MainConsole.Instance.Output(String.Format(
764 "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}", 764 "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}",
765 scene.RegionInfo.RegionName, 765 scene.RegionInfo.RegionName,
766 scene.RegionInfo.RegionLocX, 766 scene.RegionInfo.LegacyRegionLocX,
767 scene.RegionInfo.RegionLocY, 767 scene.RegionInfo.LegacyRegionLocY,
768 scene.RegionInfo.InternalEndPoint.Port, 768 scene.RegionInfo.InternalEndPoint.Port,
769 scene.RegionInfo.EstateSettings.EstateName)); 769 scene.RegionInfo.EstateSettings.EstateName));
770 }); 770 });
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index b032e7f..1e34a1e 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -742,7 +742,7 @@ namespace OpenSim
742 { 742 {
743 m_log.InfoFormat( 743 m_log.InfoFormat(
744 "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", 744 "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
745 whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); 745 whichRegion.RegionName, whichRegion.LegacyRegionLocX, whichRegion.LegacyRegionLocY);
746 746
747 ShutdownClientServer(whichRegion); 747 ShutdownClientServer(whichRegion);
748 IScene scene; 748 IScene scene;
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 3609ec1..7b7daed 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2910,8 +2910,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2910 { 2910 {
2911 pos = (land.AABBMax + land.AABBMin) * 0.5f; 2911 pos = (land.AABBMax + land.AABBMin) * 0.5f;
2912 } 2912 }
2913 reply.Data.GlobalX = info.RegionLocX + x; 2913 reply.Data.GlobalX = info.LegacyRegionLocX + x;
2914 reply.Data.GlobalY = info.RegionLocY + y; 2914 reply.Data.GlobalY = info.LegacyRegionLocY + y;
2915 reply.Data.GlobalZ = pos.Z; 2915 reply.Data.GlobalZ = pos.Z;
2916 reply.Data.SimName = Utils.StringToBytes(info.RegionName); 2916 reply.Data.SimName = Utils.StringToBytes(info.RegionName);
2917 reply.Data.SnapshotID = land.SnapshotID; 2917 reply.Data.SnapshotID = land.SnapshotID;
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 5229c08..4616170 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -180,8 +180,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
180 string message = c.Message; 180 string message = c.Message;
181 Scene scene = (Scene)c.Scene; 181 Scene scene = (Scene)c.Scene;
182 Vector3 fromPos = c.Position; 182 Vector3 fromPos = c.Position;
183 Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 183 Vector3 regionPos = new Vector3(scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
184 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 184 scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
185 185
186 if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel; 186 if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
187 187
@@ -333,8 +333,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
333 { 333 {
334 Vector3 fromRegionPos = fromPos + regionPos; 334 Vector3 fromRegionPos = fromPos + regionPos;
335 Vector3 toRegionPos = presence.AbsolutePosition + 335 Vector3 toRegionPos = presence.AbsolutePosition +
336 new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, 336 new Vector3(presence.Scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
337 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 337 presence.Scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
338 338
339 int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos); 339 int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
340 340
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 56ff2bd..7c60a40 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -663,8 +663,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
663 663
664 Vector3 avaPos = p.AbsolutePosition; 664 Vector3 avaPos = p.AbsolutePosition;
665 // Getting the global position for the Avatar 665 // Getting the global position for the Avatar
666 Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.RegionLocX*Constants.RegionSize + avaPos.X, 666 Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.LegacyRegionLocX*Constants.RegionSize + avaPos.X,
667 remoteClient.Scene.RegionInfo.RegionLocY*Constants.RegionSize + avaPos.Y, 667 remoteClient.Scene.RegionInfo.LegacyRegionLocY*Constants.RegionSize + avaPos.Y,
668 avaPos.Z); 668 avaPos.Z);
669 669
670 string landOwnerName = string.Empty; 670 string landOwnerName = string.Empty;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8ae81ac..38c4d17 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -494,8 +494,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
494 } 494 }
495 495
496 // Check that these are not the same coordinates 496 // Check that these are not the same coordinates
497 if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && 497 if (finalDestination.RegionLocX == sp.Scene.RegionInfo.LegacyRegionLocX &&
498 finalDestination.RegionLocY == sp.Scene.RegionInfo.RegionLocY) 498 finalDestination.RegionLocY == sp.Scene.RegionInfo.LegacyRegionLocY)
499 { 499 {
500 // Can't do. Viewer crashes 500 // Can't do. Viewer crashes
501 sp.ControllingClient.SendTeleportFailed("Space warp! You would crash. Move to a different region and try again."); 501 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
567// destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI); 567// destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI);
568 568
569 // Insanely, RegionLoc on RegionInfo is the 256m map co-ord whilst GridRegion.RegionLoc is the raw meters position. 569 // Insanely, RegionLoc on RegionInfo is the 256m map co-ord whilst GridRegion.RegionLoc is the raw meters position.
570 return Math.Abs(sourceRegion.RegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance 570 return Math.Abs(sourceRegion.LegacyRegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
571 && Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance; 571 && Math.Abs(sourceRegion.LegacyRegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
572 } 572 }
573 573
574 /// <summary> 574 /// <summary>
@@ -635,7 +635,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
635 string.Format( 635 string.Format(
636 "Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way", 636 "Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way",
637 finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY, 637 finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY,
638 sourceRegion.RegionName, sourceRegion.RegionLocX, sourceRegion.RegionLocY, 638 sourceRegion.RegionName, sourceRegion.LegacyRegionLocX, sourceRegion.LegacyRegionLocY,
639 MaxTransferDistance)); 639 MaxTransferDistance));
640 640
641 return; 641 return;
@@ -1374,8 +1374,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1374// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name); 1374// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name);
1375 1375
1376 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z); 1376 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
1377 uint neighbourx = scene.RegionInfo.RegionLocX; 1377 uint neighbourx = scene.RegionInfo.LegacyRegionLocX;
1378 uint neighboury = scene.RegionInfo.RegionLocY; 1378 uint neighboury = scene.RegionInfo.LegacyRegionLocY;
1379 const float boundaryDistance = 1.7f; 1379 const float boundaryDistance = 1.7f;
1380 Vector3 northCross = new Vector3(0, boundaryDistance, 0); 1380 Vector3 northCross = new Vector3(0, boundaryDistance, 0);
1381 Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0); 1381 Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
@@ -1408,8 +1408,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1408 neighbourx = b.TriggerRegionX; 1408 neighbourx = b.TriggerRegionX;
1409 1409
1410 Vector3 newposition = pos; 1410 Vector3 newposition = pos;
1411 newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize; 1411 newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
1412 newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize; 1412 newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
1413 agent.ControllingClient.SendAgentAlertMessage( 1413 agent.ControllingClient.SendAgentAlertMessage(
1414 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false); 1414 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
1415 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene); 1415 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@@ -1431,8 +1431,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1431 neighbourx = ba.TriggerRegionX; 1431 neighbourx = ba.TriggerRegionX;
1432 1432
1433 Vector3 newposition = pos; 1433 Vector3 newposition = pos;
1434 newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize; 1434 newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
1435 newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize; 1435 newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
1436 agent.ControllingClient.SendAgentAlertMessage( 1436 agent.ControllingClient.SendAgentAlertMessage(
1437 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false); 1437 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
1438 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene); 1438 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@@ -1462,8 +1462,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1462 neighboury = ba.TriggerRegionY; 1462 neighboury = ba.TriggerRegionY;
1463 neighbourx = ba.TriggerRegionX; 1463 neighbourx = ba.TriggerRegionX;
1464 Vector3 newposition = pos; 1464 Vector3 newposition = pos;
1465 newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize; 1465 newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
1466 newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize; 1466 newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
1467 agent.ControllingClient.SendAgentAlertMessage( 1467 agent.ControllingClient.SendAgentAlertMessage(
1468 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false); 1468 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
1469 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene); 1469 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@@ -1492,8 +1492,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1492 neighboury = b.TriggerRegionY; 1492 neighboury = b.TriggerRegionY;
1493 neighbourx = b.TriggerRegionX; 1493 neighbourx = b.TriggerRegionX;
1494 Vector3 newposition = pos; 1494 Vector3 newposition = pos;
1495 newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize; 1495 newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
1496 newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize; 1496 newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
1497 agent.ControllingClient.SendAgentAlertMessage( 1497 agent.ControllingClient.SendAgentAlertMessage(
1498 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false); 1498 String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
1499 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene); 1499 InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
@@ -1901,7 +1901,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1901 1901
1902 if (m_regionInfo != null) 1902 if (m_regionInfo != null)
1903 { 1903 {
1904 neighbours = RequestNeighbours(sp, m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); 1904 neighbours = RequestNeighbours(sp, m_regionInfo.LegacyRegionLocX, m_regionInfo.LegacyRegionLocY);
1905 } 1905 }
1906 else 1906 else
1907 { 1907 {
@@ -2057,8 +2057,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2057 2057
2058 Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour) 2058 Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour)
2059 { 2059 {
2060 int rRegionX = (int)sp.Scene.RegionInfo.RegionLocX; 2060 int rRegionX = (int)sp.Scene.RegionInfo.LegacyRegionLocX;
2061 int rRegionY = (int)sp.Scene.RegionInfo.RegionLocY; 2061 int rRegionY = (int)sp.Scene.RegionInfo.LegacyRegionLocY;
2062 int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize; 2062 int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize;
2063 int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize; 2063 int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize;
2064 int shiftx = (rRegionX - tRegionX) * (int)Constants.RegionSize; 2064 int shiftx = (rRegionX - tRegionX) * (int)Constants.RegionSize;
@@ -2161,10 +2161,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2161 extent.X = ((int)extent.X / (int)Constants.RegionSize); 2161 extent.X = ((int)extent.X / (int)Constants.RegionSize);
2162 extent.Y = ((int)extent.Y / (int)Constants.RegionSize); 2162 extent.Y = ((int)extent.Y / (int)Constants.RegionSize);
2163 2163
2164 swCorner.X = Scene.RegionInfo.RegionLocX - 1; 2164 swCorner.X = Scene.RegionInfo.LegacyRegionLocX - 1;
2165 swCorner.Y = Scene.RegionInfo.RegionLocY - 1; 2165 swCorner.Y = Scene.RegionInfo.LegacyRegionLocY - 1;
2166 neCorner.X = Scene.RegionInfo.RegionLocX + extent.X; 2166 neCorner.X = Scene.RegionInfo.LegacyRegionLocX + extent.X;
2167 neCorner.Y = Scene.RegionInfo.RegionLocY + extent.Y; 2167 neCorner.Y = Scene.RegionInfo.LegacyRegionLocY + extent.Y;
2168 } 2168 }
2169 2169
2170 /// <summary> 2170 /// <summary>
@@ -2301,8 +2301,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2301 return; 2301 return;
2302 } 2302 }
2303 2303
2304 int thisx = (int)scene.RegionInfo.RegionLocX; 2304 int thisx = (int)scene.RegionInfo.LegacyRegionLocX;
2305 int thisy = (int)scene.RegionInfo.RegionLocY; 2305 int thisy = (int)scene.RegionInfo.LegacyRegionLocY;
2306 Vector3 EastCross = new Vector3(0.1f, 0, 0); 2306 Vector3 EastCross = new Vector3(0.1f, 0, 0);
2307 Vector3 WestCross = new Vector3(-0.1f, 0, 0); 2307 Vector3 WestCross = new Vector3(-0.1f, 0, 0);
2308 Vector3 NorthCross = new Vector3(0, 0.1f, 0); 2308 Vector3 NorthCross = new Vector3(0, 0.1f, 0);
diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
index d943b20..769d662 100644
--- a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
@@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
213 if (part != null) 213 if (part != null)
214 { 214 {
215 ObjectRegionName = s.RegionInfo.RegionName; 215 ObjectRegionName = s.RegionInfo.RegionName;
216 uint localX = (s.RegionInfo.RegionLocX * (int)Constants.RegionSize); 216 uint localX = (s.RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize);
217 uint localY = (s.RegionInfo.RegionLocY * (int)Constants.RegionSize); 217 uint localY = (s.RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize);
218 ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")"; 218 ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")";
219 return part; 219 return part;
220 } 220 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
index 26d22b8..c1f2f04 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
@@ -224,10 +224,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
224 } 224 }
225 225
226 string reason = string.Empty; 226 string reason = string.Empty;
227 if (!m_MapService.AddMapTile((int)scene.RegionInfo.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason)) 227 if (!m_MapService.AddMapTile((int)scene.RegionInfo.LegacyRegionLocX, (int)scene.RegionInfo.LegacyRegionLocY, jpgData, out reason))
228 { 228 {
229 m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}", 229 m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}",
230 scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, reason); 230 scene.RegionInfo.RegionName, scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY, reason);
231 } 231 }
232 } 232 }
233 } 233 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
index d8dace2..9aa4243 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
@@ -71,8 +71,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
71 71
72 public void AddScene(Scene scene) 72 public void AddScene(Scene scene)
73 { 73 {
74 uint x = scene.RegionInfo.RegionLocX; 74 uint x = scene.RegionInfo.LegacyRegionLocX;
75 uint y = scene.RegionInfo.RegionLocY; 75 uint y = scene.RegionInfo.LegacyRegionLocY;
76 76
77 SortedDictionary<uint, Scene> row; 77 SortedDictionary<uint, Scene> row;
78 if (!Regions.TryGetValue(y, out row)) 78 if (!Regions.TryGetValue(y, out row))
@@ -120,8 +120,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
120 { 120 {
121 // We add the region's coordinates to ensure uniqueness even if multiple regions have the same name 121 // We add the region's coordinates to ensure uniqueness even if multiple regions have the same name
122 string path = string.Format("{0}_{1}_{2}", 122 string path = string.Format("{0}_{1}_{2}",
123 scene.RegionInfo.RegionLocX - Rect.X + 1, 123 scene.RegionInfo.LegacyRegionLocX - Rect.X + 1,
124 scene.RegionInfo.RegionLocY - Rect.Y + 1, 124 scene.RegionInfo.LegacyRegionLocY - Rect.Y + 1,
125 scene.RegionInfo.RegionName.Replace(' ', '_')); 125 scene.RegionInfo.RegionName.Replace(' ', '_'));
126 m_regionDirs[scene.RegionInfo.RegionID] = path; 126 m_regionDirs[scene.RegionInfo.RegionID] = path;
127 }); 127 });
diff --git a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
index 3dcc020..25f1e5c 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
@@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
145 { 145 {
146 foreach (RegionInfo archivedRegion in m_directory2region.Values) 146 foreach (RegionInfo archivedRegion in m_directory2region.Values)
147 { 147 {
148 Point location = new Point((int)rootScene.RegionInfo.RegionLocX, (int)rootScene.RegionInfo.RegionLocY); 148 Point location = new Point((int)rootScene.RegionInfo.LegacyRegionLocX, (int)rootScene.RegionInfo.LegacyRegionLocY);
149 location.Offset(archivedRegion.Location); 149 location.Offset(archivedRegion.Location);
150 150
151 Scene scene; 151 Scene scene;
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
index 173b603..bc172a4 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
96 int x = (args.Length > 5 ? int.Parse(args[5]) : -1); 96 int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
97 int y = (args.Length > 6 ? int.Parse(args[6]) : -1); 97 int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
98 98
99 if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x) 99 if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
100 { 100 {
101 if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y) 101 if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
102 { 102 {
103 int corner = int.Parse(num); 103 int corner = int.Parse(num);
104 UUID texture = UUID.Parse(uuid); 104 UUID texture = UUID.Parse(uuid);
@@ -135,9 +135,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
135 int x = (args.Length > 4 ? int.Parse(args[4]) : -1); 135 int x = (args.Length > 4 ? int.Parse(args[4]) : -1);
136 int y = (args.Length > 5 ? int.Parse(args[5]) : -1); 136 int y = (args.Length > 5 ? int.Parse(args[5]) : -1);
137 137
138 if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x) 138 if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
139 { 139 {
140 if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y) 140 if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
141 { 141 {
142 double selectedheight = double.Parse(heightstring); 142 double selectedheight = double.Parse(heightstring);
143 143
@@ -159,9 +159,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
159 int x = (args.Length > 6 ? int.Parse(args[6]) : -1); 159 int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
160 int y = (args.Length > 7 ? int.Parse(args[7]) : -1); 160 int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
161 161
162 if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x) 162 if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
163 { 163 {
164 if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y) 164 if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
165 { 165 {
166 int corner = int.Parse(num); 166 int corner = int.Parse(num);
167 float lowValue = float.Parse(min, Culture.NumberFormatInfo); 167 float lowValue = float.Parse(min, Culture.NumberFormatInfo);
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 1789d6d..51ed83f 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1717,8 +1717,8 @@ namespace OpenSim.Region.CoreModules.World.Land
1717 // HACK for now 1717 // HACK for now
1718 RegionInfo r = new RegionInfo(); 1718 RegionInfo r = new RegionInfo();
1719 r.RegionName = info.RegionName; 1719 r.RegionName = info.RegionName;
1720 r.RegionLocX = (uint)info.RegionLocX; 1720 r.LegacyRegionLocX = (uint)info.RegionLocX;
1721 r.RegionLocY = (uint)info.RegionLocY; 1721 r.LegacyRegionLocY = (uint)info.RegionLocY;
1722 r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess); 1722 r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess);
1723 remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y); 1723 remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y);
1724 } 1724 }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index fd30c46..c1ffd22 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -553,8 +553,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
553 /// <param name="fileStartY">Where to begin our slice</param> 553 /// <param name="fileStartY">Where to begin our slice</param>
554 public void LoadFromFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY) 554 public void LoadFromFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
555 { 555 {
556 int offsetX = (int) m_scene.RegionInfo.RegionLocX - fileStartX; 556 int offsetX = (int) m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
557 int offsetY = (int) m_scene.RegionInfo.RegionLocY - fileStartY; 557 int offsetY = (int) m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
558 558
559 if (offsetX >= 0 && offsetX < fileWidth && offsetY >= 0 && offsetY < fileHeight) 559 if (offsetX >= 0 && offsetX < fileWidth && offsetY >= 0 && offsetY < fileHeight)
560 { 560 {
@@ -594,14 +594,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
594 /// <param name="fileStartY">The may y co-ordinate at which to begin the save.</param> 594 /// <param name="fileStartY">The may y co-ordinate at which to begin the save.</param>
595 public void SaveToFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY) 595 public void SaveToFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
596 { 596 {
597 int offsetX = (int)m_scene.RegionInfo.RegionLocX - fileStartX; 597 int offsetX = (int)m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
598 int offsetY = (int)m_scene.RegionInfo.RegionLocY - fileStartY; 598 int offsetY = (int)m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
599 599
600 if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight) 600 if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight)
601 { 601 {
602 MainConsole.Instance.OutputFormat( 602 MainConsole.Instance.OutputFormat(
603 "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.", 603 "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.",
604 m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY); 604 m_scene.RegionInfo.LegacyRegionLocX, m_scene.RegionInfo.LegacyRegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
605 605
606 return; 606 return;
607 } 607 }
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index a26a5f0..c985ca2 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
240 // 6/8/2011 -- I'm adding an explicit 2048 check, so that we never forget that there is 240 // 6/8/2011 -- I'm adding an explicit 2048 check, so that we never forget that there is
241 // a hack here, and so that regions below 4096 don't get spammed with unnecessary map blocks. 241 // a hack here, and so that regions below 4096 don't get spammed with unnecessary map blocks.
242 242
243 if (m_scene.RegionInfo.RegionLocX >= 2048 || m_scene.RegionInfo.RegionLocY >= 2048) 243 if (m_scene.RegionInfo.LegacyRegionLocX >= 2048 || m_scene.RegionInfo.LegacyRegionLocY >= 2048)
244 { 244 {
245 ScenePresence avatarPresence = null; 245 ScenePresence avatarPresence = null;
246 246
@@ -269,10 +269,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
269 List<MapBlockData> mapBlocks = new List<MapBlockData>(); ; 269 List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
270 270
271 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, 271 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
272 (int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize, 272 (int)(m_scene.RegionInfo.LegacyRegionLocX - 8) * (int)Constants.RegionSize,
273 (int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize, 273 (int)(m_scene.RegionInfo.LegacyRegionLocX + 8) * (int)Constants.RegionSize,
274 (int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize, 274 (int)(m_scene.RegionInfo.LegacyRegionLocY - 8) * (int)Constants.RegionSize,
275 (int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize); 275 (int)(m_scene.RegionInfo.LegacyRegionLocY + 8) * (int)Constants.RegionSize);
276 foreach (GridRegion r in regions) 276 foreach (GridRegion r in regions)
277 { 277 {
278 MapBlockData block = new MapBlockData(); 278 MapBlockData block = new MapBlockData();
@@ -1199,10 +1199,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1199 1199
1200 List<MapBlockData> mapBlocks = new List<MapBlockData>(); 1200 List<MapBlockData> mapBlocks = new List<MapBlockData>();
1201 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, 1201 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
1202 (int)(m_scene.RegionInfo.RegionLocX - 9) * (int)Constants.RegionSize, 1202 (int)(m_scene.RegionInfo.LegacyRegionLocX - 9) * (int)Constants.RegionSize,
1203 (int)(m_scene.RegionInfo.RegionLocX + 9) * (int)Constants.RegionSize, 1203 (int)(m_scene.RegionInfo.LegacyRegionLocX + 9) * (int)Constants.RegionSize,
1204 (int)(m_scene.RegionInfo.RegionLocY - 9) * (int)Constants.RegionSize, 1204 (int)(m_scene.RegionInfo.LegacyRegionLocY - 9) * (int)Constants.RegionSize,
1205 (int)(m_scene.RegionInfo.RegionLocY + 9) * (int)Constants.RegionSize); 1205 (int)(m_scene.RegionInfo.LegacyRegionLocY + 9) * (int)Constants.RegionSize);
1206 List<AssetBase> textures = new List<AssetBase>(); 1206 List<AssetBase> textures = new List<AssetBase>();
1207 List<Image> bitImages = new List<Image>(); 1207 List<Image> bitImages = new List<Image>();
1208 1208
@@ -1243,8 +1243,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1243 1243
1244 for (int i = 0; i < mapBlocks.Count; i++) 1244 for (int i = 0; i < mapBlocks.Count; i++)
1245 { 1245 {
1246 ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.RegionLocX) + 10); 1246 ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.LegacyRegionLocX) + 10);
1247 ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.RegionLocY) + 10); 1247 ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.LegacyRegionLocY) + 10);
1248 g.DrawImage(bitImages[i], (x * 128), 2560 - (y * 128), 128, 128); // y origin is top 1248 g.DrawImage(bitImages[i], (x * 128), 2560 - (y * 128), 128, 128); // y origin is top
1249 } 1249 }
1250 1250
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3dc509b..e63963a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1107,8 +1107,8 @@ namespace OpenSim.Region.Framework.Scenes
1107 if (RegionInfo.RegionHandle != otherRegion.RegionHandle) 1107 if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
1108 { 1108 {
1109 // If these are cast to INT because long + negative values + abs returns invalid data 1109 // If these are cast to INT because long + negative values + abs returns invalid data
1110 int resultX = Math.Abs((int)xcell - (int)RegionInfo.RegionLocX); 1110 int resultX = Math.Abs((int)xcell - (int)RegionInfo.LegacyRegionLocX);
1111 int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY); 1111 int resultY = Math.Abs((int)ycell - (int)RegionInfo.LegacyRegionLocY);
1112 if (resultX <= 1 && resultY <= 1) 1112 if (resultX <= 1 && resultY <= 1)
1113 { 1113 {
1114 // Let the grid service module know, so this can be cached 1114 // Let the grid service module know, so this can be cached
@@ -1183,8 +1183,8 @@ namespace OpenSim.Region.Framework.Scenes
1183 /// </returns> 1183 /// </returns>
1184 public int HaveNeighbor(Cardinals car, ref int[] fix) 1184 public int HaveNeighbor(Cardinals car, ref int[] fix)
1185 { 1185 {
1186 uint neighbourx = RegionInfo.RegionLocX; 1186 uint neighbourx = RegionInfo.LegacyRegionLocX;
1187 uint neighboury = RegionInfo.RegionLocY; 1187 uint neighboury = RegionInfo.LegacyRegionLocY;
1188 1188
1189 int dir = (int)car; 1189 int dir = (int)car;
1190 1190
@@ -1204,8 +1204,8 @@ namespace OpenSim.Region.Framework.Scenes
1204 1204
1205 if (neighbourRegion == null) 1205 if (neighbourRegion == null)
1206 { 1206 {
1207 fix[0] = (int)(RegionInfo.RegionLocX - neighbourx); 1207 fix[0] = (int)(RegionInfo.LegacyRegionLocX - neighbourx);
1208 fix[1] = (int)(RegionInfo.RegionLocY - neighboury); 1208 fix[1] = (int)(RegionInfo.LegacyRegionLocY - neighboury);
1209 return dir * (-1); 1209 return dir * (-1);
1210 } 1210 }
1211 else 1211 else
@@ -4371,8 +4371,8 @@ namespace OpenSim.Region.Framework.Scenes
4371 { 4371 {
4372 uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); 4372 uint rRegionX = (uint)(cAgentData.RegionHandle >> 40);
4373 uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); 4373 uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8);
4374 uint tRegionX = RegionInfo.RegionLocX; 4374 uint tRegionX = RegionInfo.LegacyRegionLocX;
4375 uint tRegionY = RegionInfo.RegionLocY; 4375 uint tRegionY = RegionInfo.LegacyRegionLocY;
4376 //Send Data to ScenePresence 4376 //Send Data to ScenePresence
4377 childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); 4377 childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY);
4378 // Not Implemented: 4378 // Not Implemented:
@@ -4600,13 +4600,13 @@ namespace OpenSim.Region.Framework.Scenes
4600 ScenePresence sp = GetScenePresence(remoteClient.AgentId); 4600 ScenePresence sp = GetScenePresence(remoteClient.AgentId);
4601 if (sp != null) 4601 if (sp != null)
4602 { 4602 {
4603 uint regionX = RegionInfo.RegionLocX; 4603 uint regionX = RegionInfo.LegacyRegionLocX;
4604 uint regionY = RegionInfo.RegionLocY; 4604 uint regionY = RegionInfo.LegacyRegionLocY;
4605 4605
4606 Utils.LongToUInts(regionHandle, out regionX, out regionY); 4606 Utils.LongToUInts(regionHandle, out regionX, out regionY);
4607 4607
4608 int shiftx = (int) regionX - (int) RegionInfo.RegionLocX * (int)Constants.RegionSize; 4608 int shiftx = (int) regionX - (int) RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize;
4609 int shifty = (int) regionY - (int) RegionInfo.RegionLocY * (int)Constants.RegionSize; 4609 int shifty = (int) regionY - (int) RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize;
4610 4610
4611 position.X += shiftx; 4611 position.X += shiftx;
4612 position.Y += shifty; 4612 position.Y += shifty;
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 28f7896..2677989 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -445,8 +445,8 @@ namespace OpenSim.Region.Framework.Scenes
445 { 445 {
446 foreach (Scene mscene in m_localScenes) 446 foreach (Scene mscene in m_localScenes)
447 { 447 {
448 if (mscene.RegionInfo.RegionLocX == locX && 448 if (mscene.RegionInfo.LegacyRegionLocX == locX &&
449 mscene.RegionInfo.RegionLocY == locY) 449 mscene.RegionInfo.LegacyRegionLocY == locY)
450 { 450 {
451 scene = mscene; 451 scene = mscene;
452 return true; 452 return true;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 7243db1..7ef144c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -710,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes
710 Utils.LongToUInts(handle, out x, out y); 710 Utils.LongToUInts(handle, out x, out y);
711 x = x / Constants.RegionSize; 711 x = x / Constants.RegionSize;
712 y = y / Constants.RegionSize; 712 y = y / Constants.RegionSize;
713 if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) 713 if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.LegacyRegionLocX, y, Scene.RegionInfo.LegacyRegionLocY))
714 { 714 {
715 old.Add(handle); 715 old.Add(handle);
716 } 716 }
@@ -2094,8 +2094,8 @@ namespace OpenSim.Region.Framework.Scenes
2094// } 2094// }
2095 2095
2096 // Get terrain height for sub-region in a megaregion if necessary 2096 // Get terrain height for sub-region in a megaregion if necessary
2097 int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X); 2097 int X = (int)((m_scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize) + pos.X);
2098 int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y); 2098 int Y = (int)((m_scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize) + pos.Y);
2099 GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y); 2099 GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y);
2100 // If X and Y is NaN, target_region will be null 2100 // If X and Y is NaN, target_region will be null
2101 if (target_region == null) 2101 if (target_region == null)
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index 95f9caf..67998a0 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -437,7 +437,7 @@ namespace OpenSim.Region.Framework.Scenes
437 437
438 SimStats simStats 438 SimStats simStats
439 = new SimStats( 439 = new SimStats(
440 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, 440 ReportingRegion.LegacyRegionLocX, ReportingRegion.LegacyRegionLocY, regionFlags, (uint)m_objectCapacity,
441 rb, sb, m_scene.RegionInfo.originRegionID); 441 rb, sb, m_scene.RegionInfo.originRegionID);
442 442
443 handlerSendStatResult = OnSendStatsResult; 443 handlerSendStatResult = OnSendStatsResult;
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
index d4fe5e0..cbc538e 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
@@ -84,8 +84,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
84 84
85 Region = scene.RegionInfo.RegionName; 85 Region = scene.RegionInfo.RegionName;
86 Host = scene.RegionInfo.ExternalHostName; 86 Host = scene.RegionInfo.ExternalHostName;
87 LocX = Convert.ToString(scene.RegionInfo.RegionLocX); 87 LocX = Convert.ToString(scene.RegionInfo.LegacyRegionLocX);
88 LocY = Convert.ToString(scene.RegionInfo.RegionLocY); 88 LocY = Convert.ToString(scene.RegionInfo.LegacyRegionLocY);
89 IDK = Convert.ToString(_idk_++); 89 IDK = Convert.ToString(_idk_++);
90 90
91 showAlert = config.GetBoolean("alert_show", false); 91 showAlert = config.GetBoolean("alert_show", false);
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
index 83732e2..7f616bb 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
@@ -100,8 +100,8 @@ namespace OpenSim.Region.RegionCombinerModule
100 UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem, 100 UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem,
101 UUID fromtaskid) 101 UUID fromtaskid)
102 { 102 {
103 int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX; 103 int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
104 int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY; 104 int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
105 rayend.X += differenceX * (int)Constants.RegionSize; 105 rayend.X += differenceX * (int)Constants.RegionSize;
106 rayend.Y += differenceY * (int)Constants.RegionSize; 106 rayend.Y += differenceY * (int)Constants.RegionSize;
107 raystart.X += differenceX * (int)Constants.RegionSize; 107 raystart.X += differenceX * (int)Constants.RegionSize;
@@ -126,8 +126,8 @@ namespace OpenSim.Region.RegionCombinerModule
126 PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid, 126 PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid,
127 byte rayendisintersection) 127 byte rayendisintersection)
128 { 128 {
129 int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX; 129 int differenceX = (int)m_virtScene.RegionInfo.LegacyRegionLocX - (int)m_rootScene.RegionInfo.LegacyRegionLocX;
130 int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY; 130 int differenceY = (int)m_virtScene.RegionInfo.LegacyRegionLocY - (int)m_rootScene.RegionInfo.LegacyRegionLocY;
131 rayend.X += differenceX * (int)Constants.RegionSize; 131 rayend.X += differenceX * (int)Constants.RegionSize;
132 rayend.Y += differenceY * (int)Constants.RegionSize; 132 rayend.Y += differenceY * (int)Constants.RegionSize;
133 raystart.X += differenceX * (int)Constants.RegionSize; 133 raystart.X += differenceX * (int)Constants.RegionSize;
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 7127c73..3f835a4 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -246,8 +246,8 @@ namespace OpenSim.Region.RegionCombinerModule
246 newConn.RegionScene = scene; 246 newConn.RegionScene = scene;
247 newConn.RegionLandChannel = scene.LandChannel; 247 newConn.RegionLandChannel = scene.LandChannel;
248 newConn.RegionId = scene.RegionInfo.originRegionID; 248 newConn.RegionId = scene.RegionInfo.originRegionID;
249 newConn.X = scene.RegionInfo.RegionLocX; 249 newConn.X = scene.RegionInfo.LegacyRegionLocX;
250 newConn.Y = scene.RegionInfo.RegionLocY; 250 newConn.Y = scene.RegionInfo.LegacyRegionLocY;
251 newConn.XEnd = (int)Constants.RegionSize; 251 newConn.XEnd = (int)Constants.RegionSize;
252 newConn.YEnd = (int)Constants.RegionSize; 252 newConn.YEnd = (int)Constants.RegionSize;
253 253
@@ -502,11 +502,11 @@ namespace OpenSim.Region.RegionCombinerModule
502 502
503 lock (scene.WestBorders) 503 lock (scene.WestBorders)
504 { 504 {
505 scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocX - rootConn.RegionScene.RegionInfo.RegionLocX) * (int)Constants.RegionSize); //auto teleport West 505 scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocX - rootConn.RegionScene.RegionInfo.LegacyRegionLocX) * (int)Constants.RegionSize); //auto teleport West
506 506
507 // Trigger auto teleport to root region 507 // Trigger auto teleport to root region
508 scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX; 508 scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
509 scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY; 509 scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
510 } 510 }
511 511
512 // Reset Terrain.. since terrain loads before we get here, we need to load 512 // Reset Terrain.. since terrain loads before we get here, we need to load
@@ -564,9 +564,9 @@ namespace OpenSim.Region.RegionCombinerModule
564 564
565 lock (scene.SouthBorders) 565 lock (scene.SouthBorders)
566 { 566 {
567 scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocY - rootConn.RegionScene.RegionInfo.RegionLocY) * (int)Constants.RegionSize); //auto teleport south 567 scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocY - rootConn.RegionScene.RegionInfo.LegacyRegionLocY) * (int)Constants.RegionSize); //auto teleport south
568 scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX; 568 scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
569 scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY; 569 scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
570 } 570 }
571 571
572 // Reset Terrain.. since terrain normally loads first. 572 // Reset Terrain.. since terrain normally loads first.
@@ -636,9 +636,9 @@ namespace OpenSim.Region.RegionCombinerModule
636 636
637 lock (scene.SouthBorders) 637 lock (scene.SouthBorders)
638 { 638 {
639 scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocY - rootConn.RegionScene.RegionInfo.RegionLocY) * (int)Constants.RegionSize); //auto teleport south 639 scene.SouthBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocY - rootConn.RegionScene.RegionInfo.LegacyRegionLocY) * (int)Constants.RegionSize); //auto teleport south
640 scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX; 640 scene.SouthBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
641 scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY; 641 scene.SouthBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
642 } 642 }
643 643
644 lock (rootConn.RegionScene.EastBorders) 644 lock (rootConn.RegionScene.EastBorders)
@@ -657,9 +657,9 @@ namespace OpenSim.Region.RegionCombinerModule
657 657
658 lock (scene.WestBorders) 658 lock (scene.WestBorders)
659 { 659 {
660 scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.RegionLocX - rootConn.RegionScene.RegionInfo.RegionLocX) * (int)Constants.RegionSize); //auto teleport West 660 scene.WestBorders[0].BorderLine.Z = (int)((scene.RegionInfo.LegacyRegionLocX - rootConn.RegionScene.RegionInfo.LegacyRegionLocX) * (int)Constants.RegionSize); //auto teleport West
661 scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.RegionLocX; 661 scene.WestBorders[0].TriggerRegionX = rootConn.RegionScene.RegionInfo.LegacyRegionLocX;
662 scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.RegionLocY; 662 scene.WestBorders[0].TriggerRegionY = rootConn.RegionScene.RegionInfo.LegacyRegionLocY;
663 } 663 }
664 664
665 /* 665 /*
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 975bf2d..c9c284f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4242,8 +4242,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4242 m_item.ItemID, item.AssetID.ToString()); 4242 m_item.ItemID, item.AssetID.ToString());
4243 4243
4244 Vector3 region = new Vector3( 4244 Vector3 region = new Vector3(
4245 World.RegionInfo.RegionLocX * Constants.RegionSize, 4245 World.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
4246 World.RegionInfo.RegionLocY * Constants.RegionSize, 4246 World.RegionInfo.LegacyRegionLocY * Constants.RegionSize,
4247 0); 4247 0);
4248 4248
4249 World.AssetService.Get(item.AssetID.ToString(), this, 4249 World.AssetService.Get(item.AssetID.ToString(), this,
@@ -5478,7 +5478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5478 public LSL_Vector llGetRegionCorner() 5478 public LSL_Vector llGetRegionCorner()
5479 { 5479 {
5480 m_host.AddScriptLPS(1); 5480 m_host.AddScriptLPS(1);
5481 return new LSL_Vector(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 5481 return new LSL_Vector(World.RegionInfo.LegacyRegionLocX * Constants.RegionSize, World.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
5482 } 5482 }
5483 5483
5484 /// <summary> 5484 /// <summary>
@@ -5651,8 +5651,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5651 5651
5652 List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID); 5652 List<GridRegion> neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID);
5653 5653
5654 uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; 5654 uint neighborX = World.RegionInfo.LegacyRegionLocX + (uint)dir.x;
5655 uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; 5655 uint neighborY = World.RegionInfo.LegacyRegionLocY + (uint)dir.y;
5656 5656
5657 foreach (GridRegion sri in neighbors) 5657 foreach (GridRegion sri in neighbors)
5658 { 5658 {
@@ -10737,7 +10737,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10737 httpHeaders["X-SecondLife-Shard"] = shard; 10737 httpHeaders["X-SecondLife-Shard"] = shard;
10738 httpHeaders["X-SecondLife-Object-Name"] = m_host.Name; 10738 httpHeaders["X-SecondLife-Object-Name"] = m_host.Name;
10739 httpHeaders["X-SecondLife-Object-Key"] = m_host.UUID.ToString(); 10739 httpHeaders["X-SecondLife-Object-Key"] = m_host.UUID.ToString();
10740 httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.RegionLocX, regionInfo.RegionLocY); 10740 httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.LegacyRegionLocX, regionInfo.LegacyRegionLocY);
10741 httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z); 10741 httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z);
10742 httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); 10742 httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z);
10743 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); 10743 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);
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
index b999509..71334ee 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
@@ -201,8 +201,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
201 NameValueCollection requestArgs = new NameValueCollection 201 NameValueCollection requestArgs = new NameValueCollection
202 { 202 {
203 { "RequestMethod", "xAddMapTile" }, 203 { "RequestMethod", "xAddMapTile" },
204 { "X", scene.RegionInfo.RegionLocX.ToString() }, 204 { "X", scene.RegionInfo.LegacyRegionLocX.ToString() },
205 { "Y", scene.RegionInfo.RegionLocY.ToString() }, 205 { "Y", scene.RegionInfo.LegacyRegionLocY.ToString() },
206 { "ContentType", "image/png" }, 206 { "ContentType", "image/png" },
207 { "EncodedData", System.Convert.ToBase64String(pngData) } 207 { "EncodedData", System.Convert.ToBase64String(pngData) }
208 }; 208 };
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 88ac5b3..14b6d1a 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -246,8 +246,8 @@ namespace OpenSim.Services.Interfaces
246 public GridRegion(RegionInfo ConvertFrom) 246 public GridRegion(RegionInfo ConvertFrom)
247 { 247 {
248 m_regionName = ConvertFrom.RegionName; 248 m_regionName = ConvertFrom.RegionName;
249 m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize); 249 m_regionLocX = (int)(ConvertFrom.LegacyRegionLocX * Constants.RegionSize);
250 m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize); 250 m_regionLocY = (int)(ConvertFrom.LegacyRegionLocY * Constants.RegionSize);
251 m_internalEndPoint = ConvertFrom.InternalEndPoint; 251 m_internalEndPoint = ConvertFrom.InternalEndPoint;
252 m_externalHostName = ConvertFrom.ExternalHostName; 252 m_externalHostName = ConvertFrom.ExternalHostName;
253 m_httpPort = ConvertFrom.HttpPort; 253 m_httpPort = ConvertFrom.HttpPort;