* 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
Adam Frisby 2007-05-30 05:20:35 +00:00
parent 488a325ab6
commit 6c003ee83f
2 changed files with 14 additions and 14 deletions

View File

@ -141,26 +141,26 @@ namespace OpenSim
len = simMapProfiles.Count;
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)
{
MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
mbReply.AgentData.AgentID = this.AgentID;
mbReply.Data = new MapBlockReplyPacket.DataBlock[Math.Min(mtu, len - i)];
int iii;
for (iii = 0; iii < mtu && i + iii < len; iii++)
int j;
for (j = 0; (j < mtu) && ((i + j) < len); j++)
{
Hashtable mp = (Hashtable)simMapProfiles[iii];
mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock();
mbReply.Data[iii].Name = libsecondlife.Helpers.StringToField((string)mp["name"]);
mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]);
mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]);
mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]);
mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]);
mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]);
mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]);
Hashtable mp = (Hashtable)simMapProfiles[j];
mbReply.Data[j] = new MapBlockReplyPacket.DataBlock();
mbReply.Data[j].Name = libsecondlife.Helpers.StringToField((string)mp["name"]);
mbReply.Data[j].Access = System.Convert.ToByte(mp["access"]);
mbReply.Data[j].Agents = System.Convert.ToByte(mp["agents"]);
mbReply.Data[j].MapImageID = new LLUUID((string)mp["map-image-id"]);
mbReply.Data[j].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
mbReply.Data[j].WaterHeight = System.Convert.ToByte(mp["water-height"]);
mbReply.Data[j].X = System.Convert.ToUInt16(mp["x"]);
mbReply.Data[j].Y = System.Convert.ToUInt16(mp["y"]);
}
//Console.WriteLine("ADAMDEBUG: Queuing MapBlockReply #" + i.ToString() + " Contains " + iii.ToString() + " region(s)");
//Console.WriteLine(mbReply.ToString());

View File

@ -353,7 +353,7 @@ namespace OpenSim
// This be busted.
MapLayerRequestPacket MapRequest = (MapLayerRequestPacket)Pack;
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;
case PacketType.MapBlockRequest: