diff options
author | Teravus Ovares (Dan Olivares) | 2009-09-06 21:26:59 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-09-06 21:26:59 -0400 |
commit | c4edefd9a0982e5b9c205a39c858d50abc677240 (patch) | |
tree | 0baddecd4f5845860c491e1b425b0f49a1ee16a8 /OpenSim/Region | |
parent | Thank you, StrawberryFride, for a hit-and-run patch to add authentication (diff) | |
download | opensim-SC-c4edefd9a0982e5b9c205a39c858d50abc677240.zip opensim-SC-c4edefd9a0982e5b9c205a39c858d50abc677240.tar.gz opensim-SC-c4edefd9a0982e5b9c205a39c858d50abc677240.tar.bz2 opensim-SC-c4edefd9a0982e5b9c205a39c858d50abc677240.tar.xz |
minor: organizational
* Move the neighbor region lookup to another method from where it was before in EnableNeighbourChildAgents.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 20 |
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 | { |