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 d473d9975e.
bulletsim
Diva Canto 2011-06-08 16:12:47 -07:00
parent 80fc607d75
commit 1bd712c541
1 changed files with 15 additions and 5 deletions

View File

@ -233,8 +233,20 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
} }
if (lookup) if (lookup)
{ {
List<MapBlockData> mapBlocks = GetAndSendBlocks(avatarPresence.ControllingClient, (int)(m_scene.RegionInfo.RegionLocX) - 4, (int)(m_scene.RegionInfo.RegionLocY) - 4, List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
(int)(m_scene.RegionInfo.RegionLocX) + 4, (int)(m_scene.RegionInfo.RegionLocY) + 4, 0);
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
(int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize,
(int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize);
foreach (GridRegion r in regions)
{
MapBlockData block = new MapBlockData();
MapBlockFromGridRegion(block, r);
mapBlocks.Add(block);
}
avatarPresence.ControllingClient.SendMapBlock(mapBlocks, 0);
lock (cachedMapBlocks) lock (cachedMapBlocks)
cachedMapBlocks = mapBlocks; cachedMapBlocks = mapBlocks;
@ -820,7 +832,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
} }
} }
protected virtual List<MapBlockData> GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) protected virtual void GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
{ {
List<MapBlockData> mapBlocks = new List<MapBlockData>(); List<MapBlockData> mapBlocks = new List<MapBlockData>();
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
@ -835,8 +847,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
mapBlocks.Add(block); mapBlocks.Add(block);
} }
remoteClient.SendMapBlock(mapBlocks, 0); remoteClient.SendMapBlock(mapBlocks, 0);
return mapBlocks;
} }
protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r) protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r)