aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs6
1 files changed, 3 insertions, 3 deletions
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
141 len = simMapProfiles.Count; 141 len = simMapProfiles.Count;
142 142
143 int i; 143 int i;
144 int mtu = 8; // Number of regions to send per packet. Will be more precise in future. ( TODO ) 144 int mtu = 16; // Number of regions to send per packet. Will be more precise in future. ( TODO )
145 for (i = 0; i < len; i += mtu) 145 for (i = 0; i < len; i += mtu)
146 { 146 {
147 MapBlockReplyPacket mbReply = new MapBlockReplyPacket(); 147 MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
148 mbReply.AgentData.AgentID = this.AgentID; 148 mbReply.AgentData.AgentID = this.AgentID;
149 149
150 mbReply.Data = new MapBlockReplyPacket.DataBlock[len]; 150 mbReply.Data = new MapBlockReplyPacket.DataBlock[Math.Min(mtu, len - i)];
151 int iii; 151 int iii;
152 for (iii = i; iii < (i + mtu); iii++) 152 for (iii = 0; iii < mtu && i + iii < len; iii++)
153 { 153 {
154 Hashtable mp = (Hashtable)simMapProfiles[iii]; 154 Hashtable mp = (Hashtable)simMapProfiles[iii];
155 mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); 155 mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock();