diff options
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs | 109 |
1 files changed, 1 insertions, 108 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs index 4f32335..ee5a23a 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs | |||
@@ -87,42 +87,7 @@ namespace OpenSim.world | |||
87 | if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero) | 87 | if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero) |
88 | { | 88 | { |
89 | //currently following code not used (or don't know of any case of destination being zero | 89 | //currently following code not used (or don't know of any case of destination being zero |
90 | libsecondlife.LLUUID[] DeRezEnts; | 90 | |
91 | DeRezEnts = new libsecondlife.LLUUID[DeRezPacket.ObjectData.Length]; | ||
92 | int i = 0; | ||
93 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | ||
94 | { | ||
95 | |||
96 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LocalID:" + Data.ObjectLocalID.ToString()); | ||
97 | foreach (Entity ent in this.Entities.Values) | ||
98 | { | ||
99 | if (ent.localid == Data.ObjectLocalID) | ||
100 | { | ||
101 | DeRezEnts[i++] = ent.uuid; | ||
102 | this.localStorage.RemovePrim(ent.uuid); | ||
103 | KillObjectPacket kill = new KillObjectPacket(); | ||
104 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; | ||
105 | kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); | ||
106 | kill.ObjectData[0].ID = ent.localid; | ||
107 | foreach (ClientView client in m_clientThreads.Values) | ||
108 | { | ||
109 | client.OutPacket(kill); | ||
110 | } | ||
111 | //Uncommenting this means an old UUID will be re-used, thus crashing the asset server | ||
112 | //Uncomment when prim/object UUIDs are random or such | ||
113 | //2007-03-22 - Randomskk | ||
114 | //this._primCount--; | ||
115 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.VERBOSE, "Deleted UUID " + ent.uuid); | ||
116 | } | ||
117 | } | ||
118 | } | ||
119 | foreach (libsecondlife.LLUUID uuid in DeRezEnts) | ||
120 | { | ||
121 | lock (Entities) | ||
122 | { | ||
123 | Entities.Remove(uuid); | ||
124 | } | ||
125 | } | ||
126 | } | 91 | } |
127 | else | 92 | else |
128 | { | 93 | { |
@@ -292,77 +257,5 @@ namespace OpenSim.world | |||
292 | } | 257 | } |
293 | } | 258 | } |
294 | } | 259 | } |
295 | |||
296 | /* | ||
297 | public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY) | ||
298 | { | ||
299 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; | ||
300 | if (((m_regInfo.RegionLocX > minX) && (m_regInfo.RegionLocX < maxX)) && ((m_regInfo.RegionLocY > minY) && (m_regInfo.RegionLocY < maxY))) | ||
301 | { | ||
302 | MapBlockReplyPacket mapReply = new MapBlockReplyPacket(); | ||
303 | mapReply.AgentData.AgentID = simClient.AgentID; | ||
304 | mapReply.AgentData.Flags = 0; | ||
305 | mapReply.Data = new MapBlockReplyPacket.DataBlock[1]; | ||
306 | mapReply.Data[0] = new MapBlockReplyPacket.DataBlock(); | ||
307 | mapReply.Data[0].MapImageID = new LLUUID("00000000-0000-0000-9999-000000000007"); | ||
308 | mapReply.Data[0].X = (ushort)m_regInfo.RegionLocX; | ||
309 | mapReply.Data[0].Y = (ushort)m_regInfo.RegionLocY; | ||
310 | mapReply.Data[0].WaterHeight = (byte)m_regInfo.RegionWaterHeight; | ||
311 | mapReply.Data[0].Name = _enc.GetBytes(this.m_regionName); | ||
312 | mapReply.Data[0].RegionFlags = 72458694; | ||
313 | mapReply.Data[0].Access = 13; | ||
314 | mapReply.Data[0].Agents = 1; //should send number of clients connected | ||
315 | simClient.OutPacket(mapReply); | ||
316 | } | ||
317 | } | ||
318 | public bool RezObjectHandler(ClientView simClient, Packet packet) | ||
319 | { | ||
320 | RezObjectPacket rezPacket = (RezObjectPacket)packet; | ||
321 | AgentInventory inven = this._inventoryCache.GetAgentsInventory(simClient.AgentID); | ||
322 | if (inven != null) | ||
323 | { | ||
324 | if (inven.InventoryItems.ContainsKey(rezPacket.InventoryData.ItemID)) | ||
325 | { | ||
326 | AssetBase asset = this._assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID); | ||
327 | if (asset != null) | ||
328 | { | ||
329 | PrimData primd = new PrimData(asset.Data); | ||
330 | Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); | ||
331 | nPrim.CreateFromStorage(primd, rezPacket.RezData.RayEnd, this._primCount, true); | ||
332 | this.Entities.Add(nPrim.uuid, nPrim); | ||
333 | this._primCount++; | ||
334 | this._inventoryCache.DeleteInventoryItem(simClient, rezPacket.InventoryData.ItemID); | ||
335 | } | ||
336 | } | ||
337 | } | ||
338 | return true; | ||
339 | } | ||
340 | public bool ModifyTerrain(ClientView simClient, Packet packet) | ||
341 | { | ||
342 | ModifyLandPacket modify = (ModifyLandPacket)packet; | ||
343 | |||
344 | switch (modify.ModifyBlock.Action) | ||
345 | { | ||
346 | case 1: | ||
347 | // raise terrain | ||
348 | if (modify.ParcelData.Length > 0) | ||
349 | { | ||
350 | Terrain.raise(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1); | ||
351 | RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West); | ||
352 | } | ||
353 | break; | ||
354 | case 2: | ||
355 | //lower terrain | ||
356 | if (modify.ParcelData.Length > 0) | ||
357 | { | ||
358 | Terrain.lower(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1); | ||
359 | RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West); | ||
360 | } | ||
361 | break; | ||
362 | } | ||
363 | return true; | ||
364 | } | ||
365 | */ | ||
366 | |||
367 | } | 260 | } |
368 | } | 261 | } |