aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs20
1 files changed, 15 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 10e1631..0cacf2d 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -233,8 +233,20 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
233 } 233 }
234 if (lookup) 234 if (lookup)
235 { 235 {
236 List<MapBlockData> mapBlocks = GetAndSendBlocks(avatarPresence.ControllingClient, (int)(m_scene.RegionInfo.RegionLocX) - 4, (int)(m_scene.RegionInfo.RegionLocY) - 4, 236 List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
237 (int)(m_scene.RegionInfo.RegionLocX) + 4, (int)(m_scene.RegionInfo.RegionLocY) + 4, 0); 237
238 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
239 (int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize,
240 (int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize,
241 (int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize,
242 (int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize);
243 foreach (GridRegion r in regions)
244 {
245 MapBlockData block = new MapBlockData();
246 MapBlockFromGridRegion(block, r);
247 mapBlocks.Add(block);
248 }
249 avatarPresence.ControllingClient.SendMapBlock(mapBlocks, 0);
238 250
239 lock (cachedMapBlocks) 251 lock (cachedMapBlocks)
240 cachedMapBlocks = mapBlocks; 252 cachedMapBlocks = mapBlocks;
@@ -820,7 +832,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
820 } 832 }
821 } 833 }
822 834
823 protected virtual List<MapBlockData> GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) 835 protected virtual void GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
824 { 836 {
825 List<MapBlockData> mapBlocks = new List<MapBlockData>(); 837 List<MapBlockData> mapBlocks = new List<MapBlockData>();
826 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, 838 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
@@ -835,8 +847,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
835 mapBlocks.Add(block); 847 mapBlocks.Add(block);
836 } 848 }
837 remoteClient.SendMapBlock(mapBlocks, 0); 849 remoteClient.SendMapBlock(mapBlocks, 0);
838
839 return mapBlocks;
840 } 850 }
841 851
842 protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r) 852 protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r)