From 88003c41a917fb8b5a64a96f9b2b15372c58204f Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 30 May 2007 04:16:46 +0000 Subject: * Bugfixes. Still not appearing correctly however. --- OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs') diff --git a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs index 9233dd0..4a978ab 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs @@ -141,15 +141,15 @@ namespace OpenSim len = simMapProfiles.Count; int i; - int mtu = 8; // Number of regions to send per packet. Will be more precise in future. ( TODO ) + int mtu = 16; // 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[Math.Min(mtu, len - i)]; int iii; - for (iii = i; iii < (i + mtu); iii++) + for (iii = 0; iii < mtu && i + iii < len; iii++) { Hashtable mp = (Hashtable)simMapProfiles[iii]; mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); -- cgit v1.1