diff options
Deleting objects should now work. But beware they aren't send to your trash folder or anything so there is at the moment no way to recover deleted objects.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 70bd003..a90c5ff 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -217,7 +217,42 @@ namespace OpenSim.Region.Environment.Scenes | |||
217 | /// <param name="simClient"></param> | 217 | /// <param name="simClient"></param> |
218 | public void DeRezObject(Packet packet, IClientAPI simClient) | 218 | public void DeRezObject(Packet packet, IClientAPI simClient) |
219 | { | 219 | { |
220 | DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)packet; | ||
220 | 221 | ||
222 | |||
223 | if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero) | ||
224 | { | ||
225 | //currently following code not used (or don't know of any case of destination being zero | ||
226 | } | ||
227 | else | ||
228 | { | ||
229 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | ||
230 | { | ||
231 | EntityBase selectedEnt = null; | ||
232 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LocalID:" + Data.ObjectLocalID.ToString()); | ||
233 | foreach (EntityBase ent in this.Entities.Values) | ||
234 | { | ||
235 | if (ent.LocalId == Data.ObjectLocalID) | ||
236 | { | ||
237 | selectedEnt = ent; | ||
238 | break; | ||
239 | } | ||
240 | } | ||
241 | if (selectedEnt != null) | ||
242 | { | ||
243 | List<ScenePresence> avatars = this.RequestAvatarList(); | ||
244 | foreach (ScenePresence avatar in avatars) | ||
245 | { | ||
246 | avatar.ControllingClient.SendKillObject(this.m_regionHandle, selectedEnt.LocalId); | ||
247 | } | ||
248 | |||
249 | lock (Entities) | ||
250 | { | ||
251 | Entities.Remove(selectedEnt.m_uuid); | ||
252 | } | ||
253 | } | ||
254 | } | ||
255 | } | ||
221 | } | 256 | } |
222 | 257 | ||
223 | /// <summary> | 258 | /// <summary> |
@@ -678,7 +713,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
678 | asset.InvType = invType; | 713 | asset.InvType = invType; |
679 | asset.Type = type; | 714 | asset.Type = type; |
680 | asset.FullID = LLUUID.Random(); | 715 | asset.FullID = LLUUID.Random(); |
681 | asset.Data = new byte[0]; | 716 | asset.Data = new byte[1]; |
682 | this.assetCache.AddAsset(asset); | 717 | this.assetCache.AddAsset(asset); |
683 | 718 | ||
684 | InventoryItemBase item = new InventoryItemBase(); | 719 | InventoryItemBase item = new InventoryItemBase(); |
@@ -689,6 +724,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
689 | item.inventoryDescription = description; | 724 | item.inventoryDescription = description; |
690 | item.inventoryName = name; | 725 | item.inventoryName = name; |
691 | item.assetType = invType; | 726 | item.assetType = invType; |
727 | item.invType = invType; | ||
692 | item.parentFolderID = folderID; | 728 | item.parentFolderID = folderID; |
693 | item.inventoryCurrentPermissions = 2147483647; | 729 | item.inventoryCurrentPermissions = 2147483647; |
694 | item.inventoryNextPermissions = nextOwnerMask; | 730 | item.inventoryNextPermissions = nextOwnerMask; |