From 5f04cebb25a18134fdd13064435892b6fe93526c Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 31 Mar 2008 16:12:24 +0000
Subject: * Fix for mantis 131, 796 * Take copy now actually takes a copy into
inventory rather than the original
---
OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 3ce7955..1001fce 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -446,6 +446,8 @@ namespace OpenSim.Region.Environment.Scenes
sbyte assetType,
byte wearableType, uint nextOwnerMask)
{
+// m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
+
if (transactionID == LLUUID.Zero)
{
CachedUserInfo userInfo
@@ -731,12 +733,12 @@ namespace OpenSim.Region.Environment.Scenes
}
///
- ///
+ /// Called when an object is removed from the environment into inventory.
///
///
///
public virtual void DeRezObject(Packet packet, IClientAPI remoteClient)
- {
+ {
DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet;
if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero)
@@ -746,7 +748,11 @@ namespace OpenSim.Region.Environment.Scenes
else
{
foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
- {
+ {
+// m_log.DebugFormat(
+// "[AGENT INVENTORY]: Received request to derez {0} into folder {1}",
+// Data.ObjectLocalID, DeRezPacket.AgentBlock.DestinationID);
+
EntityBase selectedEnt = null;
//m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString());
@@ -798,7 +804,11 @@ namespace OpenSim.Region.Environment.Scenes
remoteClient.SendInventoryItemCreateUpdate(item);
}
- DeleteSceneObjectGroup((SceneObjectGroup) selectedEnt);
+ // FIXME: Nasty hardcoding. If Destination is 1 then client wants us to take a copy
+ if (DeRezPacket.AgentBlock.Destination != 1)
+ {
+ DeleteSceneObjectGroup((SceneObjectGroup) selectedEnt);
+ }
}
}
}
--
cgit v1.1