aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index c6b3f30..08563d0 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -407,6 +407,24 @@ namespace OpenSim.Region.Framework.Scenes
407 //blah.Port = region.RemotingPort; 407 //blah.Port = region.RemotingPort;
408 } 408 }
409 409
410 public List<SimpleRegionInfo> RequestNeighbors(Scene pScene, uint pRegionLocX, uint pRegionLocY)
411 {
412 Border[] northBorders = pScene.NorthBorders.ToArray();
413 Border[] southBorders = pScene.SouthBorders.ToArray();
414 Border[] eastBorders = pScene.EastBorders.ToArray();
415 Border[] westBorders = pScene.WestBorders.ToArray();
416
417 // Legacy one region. Provided for simplicity while testing the all inclusive method in the else statement.
418 if (northBorders.Length <= 1 && southBorders.Length <= 1 && eastBorders.Length <= 1 && westBorders.Length <= 1)
419 {
420 return m_commsProvider.GridService.RequestNeighbours(pRegionLocX, pRegionLocY);
421 }
422 else
423 {
424 return m_commsProvider.GridService.RequestNeighbours(pRegionLocX, pRegionLocY);
425 }
426 }
427
410 /// <summary> 428 /// <summary>
411 /// This informs all neighboring regions about agent "avatar". 429 /// This informs all neighboring regions about agent "avatar".
412 /// Calls an asynchronous method to do so.. so it doesn't lag the sim. 430 /// Calls an asynchronous method to do so.. so it doesn't lag the sim.
@@ -429,7 +447,7 @@ namespace OpenSim.Region.Framework.Scenes
429 if (m_regionInfo != null) 447 if (m_regionInfo != null)
430 { 448 {
431 neighbours = 449 neighbours =
432 m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); 450 RequestNeighbors(avatar.Scene,m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
433 } 451 }
434 else 452 else
435 { 453 {