From ef0e5e913e2c22f8e2cba96d54436443b573c1ed Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 17 Jun 2007 14:10:19 +0000 Subject: Very Preliminary local teleporting added (currently only can teleport within the current region). Now need to add teleporting between regions and use of the dynamic texture for the terrain. --- .../CommunicationsLocal.cs | 2 +- .../LocalBackEndServices.cs | 37 +++++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) (limited to 'OpenSim/OpenSim.LocalCommunications') diff --git a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs b/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs index 1cb5f6f..2293608 100644 --- a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs +++ b/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs @@ -45,7 +45,7 @@ namespace OpenSim.LocalCommunications { UserServer = null; GridServer = SandManager; - InterSims = SandManager; + InterRegion = SandManager; } } } diff --git a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs b/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs index dfc4505..46ace9c 100644 --- a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs +++ b/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs @@ -36,11 +36,10 @@ using OpenSim.Framework; namespace OpenSim.LocalCommunications { - public class LocalBackEndServices : IGridServices, IInterRegionCommunications { protected Dictionary regions = new Dictionary(); - protected Dictionary regionHosts = new Dictionary(); + protected Dictionary regionHosts = new Dictionary(); public LocalBackEndServices() { @@ -52,14 +51,14 @@ namespace OpenSim.LocalCommunications /// /// /// - public RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) + public RegionCommsListener RegisterRegion(RegionInfo regionInfo) { //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) { //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); this.regions.Add(regionInfo.RegionHandle, regionInfo); - RegionCommsHostBase regionHost = new RegionCommsHostBase(); + RegionCommsListener regionHost = new RegionCommsListener(); this.regionHosts.Add(regionInfo.RegionHandle, regionHost); return regionHost; @@ -111,6 +110,36 @@ namespace OpenSim.LocalCommunications } /// + /// + /// + /// + /// + /// + /// + /// + public List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) + { + List mapBlocks = new List(); + foreach(RegionInfo regInfo in this.regions.Values) + { + if (((regInfo.RegionLocX > minX) && (regInfo.RegionLocX < maxX)) && ((regInfo.RegionLocY > minY) && (regInfo.RegionLocY < maxY))) + { + MapBlockData map = new MapBlockData(); + map.Name = regInfo.RegionName; + map.X = (ushort)regInfo.RegionLocX; + map.Y = (ushort)regInfo.RegionLocY; + map.WaterHeight =(byte) regInfo.estateSettings.waterHeight; + map.MapImageId = new LLUUID("00000000-0000-0000-9999-000000000007"); + map.Agents = 1; + map.RegionFlags = 72458694; + map.Access = 13; + mapBlocks.Add(map); + } + } + return mapBlocks; + } + + /// /// /// /// -- cgit v1.1