first part of Requestmapblocks fixes: Adds uint flags param to the OnRequestMapBlocks event (and handler), as when a client sends a map block request it also sends what layer it wants it for 0,1,2. It will always send two requests, one of them being for layer 2 (the overlay layer) and the other one either 0 or 1 depending on the tab that is selected in the client worldmap window. We should also be sending what layer the reply is for in IClientAPI.SendMapBlock (current always set to 0). That will come in next part (most likely at the weekend).

0.6.0-stable
MW 2008-06-25 20:03:16 +00:00
parent e4f85bcbe7
commit 35e1a2fdfc
3 changed files with 4 additions and 3 deletions

View File

@ -421,7 +421,7 @@ namespace OpenSim.Framework
public delegate void DelinkObjects(List<uint> primIds); public delegate void DelinkObjects(List<uint> primIds);
public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag);
public delegate void RequestMapName(IClientAPI remoteClient, string mapName); public delegate void RequestMapName(IClientAPI remoteClient, string mapName);

View File

@ -5420,7 +5420,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (handlerRequestMapBlocks != null) if (handlerRequestMapBlocks != null)
{ {
handlerRequestMapBlocks(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, handlerRequestMapBlocks(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY,
MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY); MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY, MapRequest.AgentData.Flags);
} }
break; break;
case PacketType.MapNameRequest: case PacketType.MapNameRequest:

View File

@ -241,12 +241,13 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
/// <param name="minY"></param> /// <param name="minY"></param>
/// <param name="maxX"></param> /// <param name="maxX"></param>
/// <param name="maxY"></param> /// <param name="maxY"></param>
public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY) public virtual void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
{ {
List<MapBlockData> mapBlocks; List<MapBlockData> mapBlocks;
mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX - 4, minY - 4, minX + 4, minY + 4); mapBlocks = m_scene.SceneGridService.RequestNeighbourMapBlocks(minX - 4, minY - 4, minX + 4, minY + 4);
remoteClient.SendMapBlock(mapBlocks); remoteClient.SendMapBlock(mapBlocks);
} }
public Hashtable OnHTTPGetMapImage(Hashtable keysvals) public Hashtable OnHTTPGetMapImage(Hashtable keysvals)
{ {
m_log.Info("[WEBMAP]: Sending map image jpeg"); m_log.Info("[WEBMAP]: Sending map image jpeg");