aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
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
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')
-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
4 files changed, 18 insertions, 18 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;
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;