* Raised "MTU" factor in world map handling
* Lowered instant-send regions, regions are now only automatically sent within a 10x10 area (was 100x100), this limits the maximum number of regions sent when opening the map from 10,000 to 100.zircon^2
parent
488a325ab6
commit
6c003ee83f
|
@ -141,26 +141,26 @@ namespace OpenSim
|
||||||
len = simMapProfiles.Count;
|
len = simMapProfiles.Count;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int mtu = 16; // Number of regions to send per packet. Will be more precise in future. ( TODO )
|
int mtu = 24; // Number of regions to send per packet. Will be more precise in future. ( TODO )
|
||||||
for (i = 0; i < len; i += mtu)
|
for (i = 0; i < len; i += mtu)
|
||||||
{
|
{
|
||||||
MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
|
MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
|
||||||
mbReply.AgentData.AgentID = this.AgentID;
|
mbReply.AgentData.AgentID = this.AgentID;
|
||||||
|
|
||||||
mbReply.Data = new MapBlockReplyPacket.DataBlock[Math.Min(mtu, len - i)];
|
mbReply.Data = new MapBlockReplyPacket.DataBlock[Math.Min(mtu, len - i)];
|
||||||
int iii;
|
int j;
|
||||||
for (iii = 0; iii < mtu && i + iii < len; iii++)
|
for (j = 0; (j < mtu) && ((i + j) < len); j++)
|
||||||
{
|
{
|
||||||
Hashtable mp = (Hashtable)simMapProfiles[iii];
|
Hashtable mp = (Hashtable)simMapProfiles[j];
|
||||||
mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock();
|
mbReply.Data[j] = new MapBlockReplyPacket.DataBlock();
|
||||||
mbReply.Data[iii].Name = libsecondlife.Helpers.StringToField((string)mp["name"]);
|
mbReply.Data[j].Name = libsecondlife.Helpers.StringToField((string)mp["name"]);
|
||||||
mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]);
|
mbReply.Data[j].Access = System.Convert.ToByte(mp["access"]);
|
||||||
mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]);
|
mbReply.Data[j].Agents = System.Convert.ToByte(mp["agents"]);
|
||||||
mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]);
|
mbReply.Data[j].MapImageID = new LLUUID((string)mp["map-image-id"]);
|
||||||
mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
|
mbReply.Data[j].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
|
||||||
mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]);
|
mbReply.Data[j].WaterHeight = System.Convert.ToByte(mp["water-height"]);
|
||||||
mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]);
|
mbReply.Data[j].X = System.Convert.ToUInt16(mp["x"]);
|
||||||
mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]);
|
mbReply.Data[j].Y = System.Convert.ToUInt16(mp["y"]);
|
||||||
}
|
}
|
||||||
//Console.WriteLine("ADAMDEBUG: Queuing MapBlockReply #" + i.ToString() + " Contains " + iii.ToString() + " region(s)");
|
//Console.WriteLine("ADAMDEBUG: Queuing MapBlockReply #" + i.ToString() + " Contains " + iii.ToString() + " region(s)");
|
||||||
//Console.WriteLine(mbReply.ToString());
|
//Console.WriteLine(mbReply.ToString());
|
||||||
|
|
|
@ -353,7 +353,7 @@ namespace OpenSim
|
||||||
// This be busted.
|
// This be busted.
|
||||||
MapLayerRequestPacket MapRequest = (MapLayerRequestPacket)Pack;
|
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);
|
this.RequestMapBlocks((int)this.m_regionData.RegionLocX - 5, (int)this.m_regionData.RegionLocY - 5, (int)this.m_regionData.RegionLocX + 5, (int)this.m_regionData.RegionLocY + 5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.MapBlockRequest:
|
case PacketType.MapBlockRequest:
|
||||||
|
|
Loading…
Reference in New Issue