From 6c003ee83fcc796c88fcc794c17e9db168a51166 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 30 May 2007 05:20:35 +0000 Subject: * 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. --- .../ClientView.PacketHandlers.cs | 26 +++++++++++----------- .../ClientView.ProcessPackets.cs | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs index 7bfc0ce..9ce86f7 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs @@ -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()); diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs index 0d4e42e..7340bea 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs @@ -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: -- cgit v1.1