aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
diff options
context:
space:
mode:
authorDiva Canto2010-06-13 19:06:22 -0700
committerDiva Canto2010-06-13 19:06:22 -0700
commit19558f380a1e9cbaff849eb15262266ea79b60d2 (patch)
tree1209b45e0beb2100d65b539db5a6ba3448ff7abb /OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
parentFox my changes to radmin (diff)
downloadopensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.zip
opensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.tar.gz
opensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.tar.bz2
opensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.tar.xz
Fixes the long-standing RegionUp bug! Plus lots of other cleanups related to neighbours.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs21
1 files changed, 7 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index bd8ccce..c675322 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -182,24 +182,17 @@ namespace OpenSim.Region.Framework.Scenes
182 { 182 {
183 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); 183 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
184 184
185 for (int x = (int)region.RegionLocX - 1; x <= region.RegionLocX + 1; x++) 185 List<GridRegion> neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
186 m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count);
187 foreach (GridRegion n in neighbours)
186 { 188 {
187 for (int y = (int)region.RegionLocY - 1; y <= region.RegionLocY + 1; y++) 189 InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
188 { 190 d.BeginInvoke(neighbourService, region, n.RegionHandle,
189 if (!((x == region.RegionLocX) && (y == region.RegionLocY))) // skip this region 191 InformNeighborsThatRegionisUpCompleted,
190 { 192 d);
191 ulong handle = Utils.UIntsToLong((uint)x * Constants.RegionSize, (uint)y * Constants.RegionSize);
192 InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
193
194 d.BeginInvoke(neighbourService, region, handle,
195 InformNeighborsThatRegionisUpCompleted,
196 d);
197 }
198 }
199 } 193 }
200 } 194 }
201 195
202
203 public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, ulong regionHandle); 196 public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, ulong regionHandle);
204 197
205 /// <summary> 198 /// <summary>