aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.RegionServer')
-rw-r--r--OpenSim.RegionServer/SimClient.PacketHandlers.cs29
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim.RegionServer/SimClient.PacketHandlers.cs b/OpenSim.RegionServer/SimClient.PacketHandlers.cs
index bc49898..62919ba 100644
--- a/OpenSim.RegionServer/SimClient.PacketHandlers.cs
+++ b/OpenSim.RegionServer/SimClient.PacketHandlers.cs
@@ -152,12 +152,33 @@ namespace OpenSim
152 this.OutPacket(mapReply); 152 this.OutPacket(mapReply);
153 } 153 }
154 154
155 public void RequestMapBlock(int minX, int minY, int maxX, int maxY) 155 public void RequestMapBlocks(int minX, int minY, int maxX, int maxY)
156 { 156 {
157 //check if our own map was requested 157 IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY);
158 this.m_world.RequestMapBlock(this, minX, minY, maxX, maxY); 158 MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
159 mbReply.AgentData.AgentID = this.AgentID;
160 int len;
161 if (simMapProfiles == null)
162 len = 0;
163 else
164 len = simMapProfiles.Count;
159 165
160 //now should get other regions maps from gridserver 166 mbReply.Data = new MapBlockReplyPacket.DataBlock[len];
167 int iii;
168 for (iii = 0; iii < len; iii++)
169 {
170 Hashtable mp = (Hashtable)simMapProfiles[iii];
171 mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock();
172 mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]);
173 mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]);
174 mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]);
175 mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]);
176 mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
177 mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]);
178 mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]);
179 mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]);
180 }
181 this.OutPacket(mbReply);
161 } 182 }
162 } 183 }
163} 184}