From 2432cc607ec206b79149c1e9b1aa995794fec3bc Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 27 Sep 2009 13:43:57 -0700 Subject: Neighbours cache working. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++ OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 55478da..bb47ff4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -611,6 +611,9 @@ namespace OpenSim.Region.Framework.Scenes int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY); if (resultX <= 1 && resultY <= 1) { + // Let the grid service module know, so this can be cached + m_eventManager.TriggerOnRegionUp(otherRegion); + RegionInfo regInfo = new RegionInfo(xcell, ycell, otherRegion.InternalEndPoint, otherRegion.ExternalHostName); regInfo.RegionID = otherRegion.RegionID; regInfo.RegionName = otherRegion.RegionName; @@ -641,6 +644,7 @@ namespace OpenSim.Region.Framework.Scenes // This shouldn't happen too often anymore. m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); } + } else { diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 3294ceb..4a2db5e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -455,14 +455,12 @@ namespace OpenSim.Region.Framework.Scenes // So we're temporarily going back to the old method of grabbing it from the Grid Server Every time :/ if (m_regionInfo != null) { - neighbours = - RequestNeighbours(avatar.Scene,m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); + neighbours = RequestNeighbours(avatar.Scene,m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); } else { m_log.Debug("[ENABLENEIGHBOURCHILDAGENTS]: m_regionInfo was null in EnableNeighbourChildAgents, is this a NPC?"); } - /// We need to find the difference between the new regions where there are no child agents /// and the regions where there are already child agents. We only send notification to the former. -- cgit v1.1