mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Fixes the long-standing RegionUp bug! Plus lots of other cleanups related to neighbours.
This commit is contained in:
@@ -182,24 +182,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
|
||||
|
||||
for (int x = (int)region.RegionLocX - 1; x <= region.RegionLocX + 1; x++)
|
||||
List<GridRegion> neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
|
||||
m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count);
|
||||
foreach (GridRegion n in neighbours)
|
||||
{
|
||||
for (int y = (int)region.RegionLocY - 1; y <= region.RegionLocY + 1; y++)
|
||||
{
|
||||
if (!((x == region.RegionLocX) && (y == region.RegionLocY))) // skip this region
|
||||
{
|
||||
ulong handle = Utils.UIntsToLong((uint)x * Constants.RegionSize, (uint)y * Constants.RegionSize);
|
||||
InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
|
||||
|
||||
d.BeginInvoke(neighbourService, region, handle,
|
||||
InformNeighborsThatRegionisUpCompleted,
|
||||
d);
|
||||
}
|
||||
}
|
||||
InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
|
||||
d.BeginInvoke(neighbourService, region, n.RegionHandle,
|
||||
InformNeighborsThatRegionisUpCompleted,
|
||||
d);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, ulong regionHandle);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user