aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs')
-rw-r--r--OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs37
1 files changed, 33 insertions, 4 deletions
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;
36namespace OpenSim.LocalCommunications 36namespace OpenSim.LocalCommunications
37{ 37{
38 38
39
40 public class LocalBackEndServices : IGridServices, IInterRegionCommunications 39 public class LocalBackEndServices : IGridServices, IInterRegionCommunications
41 { 40 {
42 protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>(); 41 protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>();
43 protected Dictionary<ulong, RegionCommsHostBase> regionHosts = new Dictionary<ulong, RegionCommsHostBase>(); 42 protected Dictionary<ulong, RegionCommsListener> regionHosts = new Dictionary<ulong, RegionCommsListener>();
44 43
45 public LocalBackEndServices() 44 public LocalBackEndServices()
46 { 45 {
@@ -52,14 +51,14 @@ namespace OpenSim.LocalCommunications
52 /// </summary> 51 /// </summary>
53 /// <param name="regionInfo"></param> 52 /// <param name="regionInfo"></param>
54 /// <returns></returns> 53 /// <returns></returns>
55 public RegionCommsHostBase RegisterRegion(RegionInfo regionInfo) 54 public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
56 { 55 {
57 //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); 56 //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
58 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) 57 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
59 { 58 {
60 //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); 59 //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle );
61 this.regions.Add(regionInfo.RegionHandle, regionInfo); 60 this.regions.Add(regionInfo.RegionHandle, regionInfo);
62 RegionCommsHostBase regionHost = new RegionCommsHostBase(); 61 RegionCommsListener regionHost = new RegionCommsListener();
63 this.regionHosts.Add(regionInfo.RegionHandle, regionHost); 62 this.regionHosts.Add(regionInfo.RegionHandle, regionHost);
64 63
65 return regionHost; 64 return regionHost;
@@ -111,6 +110,36 @@ namespace OpenSim.LocalCommunications
111 } 110 }
112 111
113 /// <summary> 112 /// <summary>
113 ///
114 /// </summary>
115 /// <param name="minX"></param>
116 /// <param name="minY"></param>
117 /// <param name="maxX"></param>
118 /// <param name="maxY"></param>
119 /// <returns></returns>
120 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
121 {
122 List<MapBlockData> mapBlocks = new List<MapBlockData>();
123 foreach(RegionInfo regInfo in this.regions.Values)
124 {
125 if (((regInfo.RegionLocX > minX) && (regInfo.RegionLocX < maxX)) && ((regInfo.RegionLocY > minY) && (regInfo.RegionLocY < maxY)))
126 {
127 MapBlockData map = new MapBlockData();
128 map.Name = regInfo.RegionName;
129 map.X = (ushort)regInfo.RegionLocX;
130 map.Y = (ushort)regInfo.RegionLocY;
131 map.WaterHeight =(byte) regInfo.estateSettings.waterHeight;
132 map.MapImageId = new LLUUID("00000000-0000-0000-9999-000000000007");
133 map.Agents = 1;
134 map.RegionFlags = 72458694;
135 map.Access = 13;
136 mapBlocks.Add(map);
137 }
138 }
139 return mapBlocks;
140 }
141
142 /// <summary>
114 /// </summary> 143 /// </summary>
115 /// <param name="regionHandle"></param> 144 /// <param name="regionHandle"></param>
116 /// <param name="agentData"></param> 145 /// <param name="agentData"></param>