From 326c3ee14fb294796ff3b908f17da1021d321e3b Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Mon, 7 Sep 2009 12:57:30 -0400 Subject: * Enables Child Agents for all virtual regions in the region and their neighbors. There still may be issues with crossing into the mentioned neighbors of the virtual regions. This makes regions larger then 512x512 (3 virtual regions) display fully to clients. * Uses a grid request multiple times, so the more regions are in the instance, the longer logging in takes. Consider this temporary until there's a RegionInfo request similar to the MapItem Request. --- .../Framework/Scenes/SceneCommunicationService.cs | 58 +++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 08563d0..0827672 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -367,6 +367,7 @@ namespace OpenSim.Region.Framework.Scenes string reason = String.Empty; //bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, a); + bool regionAccepted = m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, a, out reason); if (regionAccepted && newAgent) @@ -384,7 +385,7 @@ namespace OpenSim.Region.Framework.Scenes eq.EnableSimulator(reg.RegionHandle, endPoint, avatar.UUID); eq.EstablishAgentCommunication(avatar.UUID, endPoint, capsPath); - m_log.DebugFormat("[CAPS]: Sending new CAPS seed url {0} to client {1} in region {2}", + m_log.DebugFormat("[CAPS]: Sending new CAPS seed url {0} to client {1} in region {2}", capsPath, avatar.UUID, avatar.Scene.RegionInfo.RegionName); } else @@ -394,7 +395,9 @@ namespace OpenSim.Region.Framework.Scenes } m_log.Info("[INTERGRID]: Completed inform client about neighbour " + endPoint.ToString()); + } + } public void RequestNeighbors(RegionInfo region) @@ -421,7 +424,48 @@ namespace OpenSim.Region.Framework.Scenes } else { - return m_commsProvider.GridService.RequestNeighbours(pRegionLocX, pRegionLocY); + Vector2 extent = Vector2.Zero; + for (int i=0;i extent.X) ? eastBorders[i].BorderLine.Z : extent.X; + } + for (int i=0;i extent.Y) ? northBorders[i].BorderLine.Z : extent.Y; + } + + List neighbourList = new List(); + + // Loss of fraction on purpose + extent.X = ((int)extent.X / (int)Constants.RegionSize) + 1; + extent.Y = ((int)extent.Y / (int)Constants.RegionSize) + 1; + + int startX = (int) pRegionLocX - 1; + int startY = (int) pRegionLocY - 1; + + int endX = (int) pRegionLocX + (int)extent.X + 1; + int endY = (int) pRegionLocY + (int)extent.Y + 1; + + for (int i=startX;i