diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 75b5a85..d4e7bb6 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -709,13 +709,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
709 | /// <param name="maxY"></param> | 709 | /// <param name="maxY"></param> |
710 | public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) | 710 | public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) |
711 | { | 711 | { |
712 | List<MapBlockData> mapBlocks; | ||
713 | if ((flag & 0x10000) != 0) // user clicked on the map a tile that isn't visible | 712 | if ((flag & 0x10000) != 0) // user clicked on the map a tile that isn't visible |
714 | { | 713 | { |
715 | List<MapBlockData> response = new List<MapBlockData>(); | 714 | List<MapBlockData> response = new List<MapBlockData>(); |
716 | 715 | ||
717 | // this should return one mapblock at most. But make sure: Look whether the one we requested is in there | 716 | // this should return one mapblock at most. But make sure: Look whether the one we requested is in there |
718 | mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY); | 717 | List<MapBlockData> mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY); |
719 | if (mapBlocks != null) | 718 | if (mapBlocks != null) |
720 | { | 719 | { |
721 | foreach (MapBlockData block in mapBlocks) | 720 | foreach (MapBlockData block in mapBlocks) |
@@ -743,11 +742,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
743 | else | 742 | else |
744 | { | 743 | { |
745 | // normal mapblock request. Use the provided values | 744 | // normal mapblock request. Use the provided values |
746 | mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX - 4, minY - 4, maxX + 4, maxY + 4); | 745 | GetAndSendBlocks(remoteClient, minX, minY, maxX, maxY, flag); |
747 | remoteClient.SendMapBlock(mapBlocks, flag); | ||
748 | } | 746 | } |
749 | } | 747 | } |
750 | 748 | ||
749 | protected virtual void GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) | ||
750 | { | ||
751 | List<MapBlockData> mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX - 4, minY - 4, maxX + 4, maxY + 4); | ||
752 | remoteClient.SendMapBlock(mapBlocks, flag); | ||
753 | } | ||
754 | |||
751 | public Hashtable OnHTTPGetMapImage(Hashtable keysvals) | 755 | public Hashtable OnHTTPGetMapImage(Hashtable keysvals) |
752 | { | 756 | { |
753 | m_log.Debug("[WORLD MAP]: Sending map image jpeg"); | 757 | m_log.Debug("[WORLD MAP]: Sending map image jpeg"); |