aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2017-06-06 03:22:11 +0100
committerUbitUmarov2017-06-06 03:22:11 +0100
commita23f99366fda4f3c85d3cde8d1a5dd805f936bae (patch)
tree53ce3c8a8bbeebfe351adf79e707047d85fb2e9b /OpenSim/Region/Framework
parentCorrect parsing of 'Media' XML element in PrimitiveBaseShape when reading an ... (diff)
downloadopensim-SC_OLD-a23f99366fda4f3c85d3cde8d1a5dd805f936bae.zip
opensim-SC_OLD-a23f99366fda4f3c85d3cde8d1a5dd805f936bae.tar.gz
opensim-SC_OLD-a23f99366fda4f3c85d3cde8d1a5dd805f936bae.tar.bz2
opensim-SC_OLD-a23f99366fda4f3c85d3cde8d1a5dd805f936bae.tar.xz
bug fix: handle current region on GetChildAgentsToClose
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index f86814d..daa9e50 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1819,6 +1819,7 @@ namespace OpenSim.Region.Framework.Scenes
1819 lock (m_knownChildRegions) 1819 lock (m_knownChildRegions)
1820 { 1820 {
1821 m_knownChildRegionsSizeInfo.Clear(); 1821 m_knownChildRegionsSizeInfo.Clear();
1822
1822 foreach (GridRegion region in regionsList) 1823 foreach (GridRegion region in regionsList)
1823 { 1824 {
1824 spRegionSizeInfo sizeInfo = new spRegionSizeInfo(); 1825 spRegionSizeInfo sizeInfo = new spRegionSizeInfo();
@@ -4440,15 +4441,19 @@ namespace OpenSim.Region.Framework.Scenes
4440 /// <returns></returns> 4441 /// <returns></returns>
4441 public List<ulong> GetChildAgentsToClose(ulong newRegionHandle, int newRegionSizeX, int newRegionSizeY) 4442 public List<ulong> GetChildAgentsToClose(ulong newRegionHandle, int newRegionSizeX, int newRegionSizeY)
4442 { 4443 {
4443 uint newRegionX, newRegionY; 4444 ulong curRegionHandle = m_scene.RegionInfo.RegionHandle;
4444 List<ulong> byebyeRegions = new List<ulong>(); 4445 List<ulong> byebyeRegions = new List<ulong>();
4446
4447 if(newRegionHandle == curRegionHandle) //??
4448 return byebyeRegions;
4449
4450 uint newRegionX, newRegionY;
4445 List<ulong> knownRegions = KnownRegionHandles; 4451 List<ulong> knownRegions = KnownRegionHandles;
4446 m_log.DebugFormat( 4452 m_log.DebugFormat(
4447 "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}", 4453 "[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}",
4448 knownRegions.Count, Scene.RegionInfo.RegionName); 4454 knownRegions.Count, Scene.RegionInfo.RegionName);
4449 4455
4450 Util.RegionHandleToRegionLoc(newRegionHandle, out newRegionX, out newRegionY); 4456 Util.RegionHandleToRegionLoc(newRegionHandle, out newRegionX, out newRegionY);
4451
4452 uint x, y; 4457 uint x, y;
4453 spRegionSizeInfo regInfo; 4458 spRegionSizeInfo regInfo;
4454 4459
@@ -4456,7 +4461,16 @@ namespace OpenSim.Region.Framework.Scenes
4456 { 4461 {
4457 if(newRegionY == 0) // HG 4462 if(newRegionY == 0) // HG
4458 byebyeRegions.Add(handle); 4463 byebyeRegions.Add(handle);
4459 else 4464 else if(handle == curRegionHandle)
4465 {
4466 RegionInfo curreg = m_scene.RegionInfo;
4467 if (Util.IsOutsideView(255, curreg.RegionLocX, newRegionX, curreg.RegionLocY, newRegionY,
4468 (int)curreg.RegionSizeX, (int)curreg.RegionSizeX, newRegionSizeX, newRegionSizeY))
4469 {
4470 byebyeRegions.Add(handle);
4471 }
4472 }
4473 else
4460 { 4474 {
4461 Util.RegionHandleToRegionLoc(handle, out x, out y); 4475 Util.RegionHandleToRegionLoc(handle, out x, out y);
4462 if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo)) 4476 if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo))
@@ -4471,7 +4485,8 @@ namespace OpenSim.Region.Framework.Scenes
4471 } 4485 }
4472 else 4486 else
4473 { 4487 {
4474 if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY, 4488// if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY,
4489 if (Util.IsOutsideView(255, x, newRegionX, y, newRegionY,
4475 (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY)) 4490 (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY))
4476 { 4491 {
4477 byebyeRegions.Add(handle); 4492 byebyeRegions.Add(handle);