aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs26
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs2
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
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());
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
353 // This be busted. 353 // This be busted.
354 MapLayerRequestPacket MapRequest = (MapLayerRequestPacket)Pack; 354 MapLayerRequestPacket MapRequest = (MapLayerRequestPacket)Pack;
355 this.RequestMapLayer(); 355 this.RequestMapLayer();
356 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); 356 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);
357 break; 357 break;
358 358
359 case PacketType.MapBlockRequest: 359 case PacketType.MapBlockRequest: