aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs26
1 files changed, 13 insertions, 13 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
141 len = simMapProfiles.Count; 141 len = simMapProfiles.Count;
142 142
143 int i; 143 int i;
144 int mtu = 16; // Number of regions to send per packet. Will be more precise in future. ( TODO ) 144 int mtu = 24; // 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[Math.Min(mtu, len - i)]; 150 mbReply.Data = new MapBlockReplyPacket.DataBlock[Math.Min(mtu, len - i)];
151 int iii; 151 int j;
152 for (iii = 0; iii < mtu && i + iii < len; iii++) 152 for (j = 0; (j < mtu) && ((i + j) < len); j++)
153 { 153 {
154 Hashtable mp = (Hashtable)simMapProfiles[iii]; 154 Hashtable mp = (Hashtable)simMapProfiles[j];
155 mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); 155 mbReply.Data[j] = new MapBlockReplyPacket.DataBlock();
156 mbReply.Data[iii].Name = libsecondlife.Helpers.StringToField((string)mp["name"]); 156 mbReply.Data[j].Name = libsecondlife.Helpers.StringToField((string)mp["name"]);
157 mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); 157 mbReply.Data[j].Access = System.Convert.ToByte(mp["access"]);
158 mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); 158 mbReply.Data[j].Agents = System.Convert.ToByte(mp["agents"]);
159 mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]); 159 mbReply.Data[j].MapImageID = new LLUUID((string)mp["map-image-id"]);
160 mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]); 160 mbReply.Data[j].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
161 mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]); 161 mbReply.Data[j].WaterHeight = System.Convert.ToByte(mp["water-height"]);
162 mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]); 162 mbReply.Data[j].X = System.Convert.ToUInt16(mp["x"]);
163 mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]); 163 mbReply.Data[j].Y = System.Convert.ToUInt16(mp["y"]);
164 } 164 }
165 //Console.WriteLine("ADAMDEBUG: Queuing MapBlockReply #" + i.ToString() + " Contains " + iii.ToString() + " region(s)"); 165 //Console.WriteLine("ADAMDEBUG: Queuing MapBlockReply #" + i.ToString() + " Contains " + iii.ToString() + " region(s)");
166 //Console.WriteLine(mbReply.ToString()); 166 //Console.WriteLine(mbReply.ToString());