* May have fixed issues with the world map.
parent
c7e8318038
commit
6f9aba58ee
|
@ -123,28 +123,33 @@ namespace OpenSim
|
||||||
mapReply.AgentData.Flags = 0;
|
mapReply.AgentData.Flags = 0;
|
||||||
mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1];
|
mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1];
|
||||||
mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock();
|
mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock();
|
||||||
mapReply.LayerData[0].Bottom = 800;
|
mapReply.LayerData[0].Bottom = this.m_regionData.RegionLocY - 50;
|
||||||
mapReply.LayerData[0].Left = 800;
|
mapReply.LayerData[0].Left = this.m_regionData.RegionLocX - 50;
|
||||||
mapReply.LayerData[0].Top = 1200;
|
mapReply.LayerData[0].Top = this.m_regionData.RegionLocY + 50;
|
||||||
mapReply.LayerData[0].Right = 1200;
|
mapReply.LayerData[0].Right = this.m_regionData.RegionLocX + 50;
|
||||||
mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
|
mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000005");
|
||||||
this.OutPacket(mapReply);
|
this.OutPacket(mapReply);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestMapBlocks(int minX, int minY, int maxX, int maxY)
|
public void RequestMapBlocks(int minX, int minY, int maxX, int maxY)
|
||||||
{
|
{
|
||||||
IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY);
|
IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY);
|
||||||
MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
|
|
||||||
mbReply.AgentData.AgentID = this.AgentID;
|
|
||||||
int len;
|
int len;
|
||||||
if (simMapProfiles == null)
|
if (simMapProfiles == null)
|
||||||
len = 0;
|
len = 0;
|
||||||
else
|
else
|
||||||
len = simMapProfiles.Count;
|
len = simMapProfiles.Count;
|
||||||
|
|
||||||
|
int i;
|
||||||
|
int mtu = 8; // Number of regions to send per packet. Will be more precise in future. ( TODO )
|
||||||
|
for (i = 0; i < len; i += mtu)
|
||||||
|
{
|
||||||
|
MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
|
||||||
|
mbReply.AgentData.AgentID = this.AgentID;
|
||||||
|
|
||||||
mbReply.Data = new MapBlockReplyPacket.DataBlock[len];
|
mbReply.Data = new MapBlockReplyPacket.DataBlock[len];
|
||||||
int iii;
|
int iii;
|
||||||
for (iii = 0; iii < len; iii++)
|
for (iii = i; iii < (i + mtu); iii++)
|
||||||
{
|
{
|
||||||
Hashtable mp = (Hashtable)simMapProfiles[iii];
|
Hashtable mp = (Hashtable)simMapProfiles[iii];
|
||||||
mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock();
|
mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock();
|
||||||
|
@ -161,3 +166,4 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -350,13 +350,21 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.MapLayerRequest:
|
case PacketType.MapLayerRequest:
|
||||||
|
// This be busted.
|
||||||
|
MapLayerRequestPacket MapRequest = (MapLayerRequestPacket)Pack;
|
||||||
this.RequestMapLayer();
|
this.RequestMapLayer();
|
||||||
|
this.RequestMapBlocks((int)this.m_regionData.RegionLocX - 50, (int)this.m_regionData.RegionLocY - 50, (int)this.m_regionData.RegionLocX + 50, (int)this.m_regionData.RegionLocY + 50);
|
||||||
break;
|
break;
|
||||||
case PacketType.MapBlockRequest:
|
|
||||||
MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack;
|
|
||||||
|
|
||||||
this.RequestMapBlocks(MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY);
|
case PacketType.MapBlockRequest:
|
||||||
|
MapBlockRequestPacket MapBRequest = (MapBlockRequestPacket)Pack;
|
||||||
|
this.RequestMapBlocks(MapBRequest.PositionData.MinX, MapBRequest.PositionData.MinY, MapBRequest.PositionData.MaxX, MapBRequest.PositionData.MaxY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PacketType.MapNameRequest:
|
||||||
|
// TODO.
|
||||||
|
break;
|
||||||
|
|
||||||
case PacketType.TeleportLandmarkRequest:
|
case PacketType.TeleportLandmarkRequest:
|
||||||
TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
|
TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue