aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorRobert Adams2013-09-19 12:14:21 -0700
committerRobert Adams2013-09-28 07:33:52 -0700
commit317c04fe1714631d851684e3bb294f02056bcd07 (patch)
treea4e935d869c9cb2d79f545f9b6dd1f73b01a7053 /OpenSim/Region/Framework/Scenes/Scene.cs
parentminor: Disable logging left active on regression test TestSameSimulatorIsolat... (diff)
downloadopensim-SC-317c04fe1714631d851684e3bb294f02056bcd07.zip
opensim-SC-317c04fe1714631d851684e3bb294f02056bcd07.tar.gz
opensim-SC-317c04fe1714631d851684e3bb294f02056bcd07.tar.bz2
opensim-SC-317c04fe1714631d851684e3bb294f02056bcd07.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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7772f94..26e7d7d 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;