aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-05-30 05:20:35 +0000
committerAdam Frisby2007-05-30 05:20:35 +0000
commit6c003ee83fcc796c88fcc794c17e9db168a51166 (patch)
tree79203334e4d8f25dbd3900128d2e042f2a8d0a8d
parent* Switched from ASCII encoding to llRetardedEncoding. (diff)
downloadopensim-SC_OLD-6c003ee83fcc796c88fcc794c17e9db168a51166.zip
opensim-SC_OLD-6c003ee83fcc796c88fcc794c17e9db168a51166.tar.gz
opensim-SC_OLD-6c003ee83fcc796c88fcc794c17e9db168a51166.tar.bz2
opensim-SC_OLD-6c003ee83fcc796c88fcc794c17e9db168a51166.tar.xz
* 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.
Diffstat (limited to '')
-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: