diff options
author | Diva Canto | 2011-06-08 16:12:47 -0700 |
---|---|---|
committer | Diva Canto | 2011-06-08 16:12:47 -0700 |
commit | 1bd712c541bb4f26a0547f5ae463092c21997713 (patch) | |
tree | 2833a8ca23631b6e511e4eb01a33d5193012eaf7 /OpenSim/Region | |
parent | Fixed "Unknown User" listed as creator/owner on prims created with the Build ... (diff) | |
download | opensim-SC-1bd712c541bb4f26a0547f5ae463092c21997713.zip opensim-SC-1bd712c541bb4f26a0547f5ae463092c21997713.tar.gz opensim-SC-1bd712c541bb4f26a0547f5ae463092c21997713.tar.bz2 opensim-SC-1bd712c541bb4f26a0547f5ae463092c21997713.tar.xz |
Reverting the [HG]MapModule to its buggy behavior above 4096. Ppl seem to prefer the color blue, and I have given up trying to make things work above 4096.
Revert "Improved reuse on the WorldMap/WorldMapModule.cs"
This reverts commit d473d9975e70366d0fd16276c9bafd5ec269dcd9.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 20 |
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) |