aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs20
2 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 7f37878..fb4ef28 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -735,7 +735,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
735 735
736 private static void ProcessTIOldItemID(TaskInventoryItem item, XmlTextReader reader) 736 private static void ProcessTIOldItemID(TaskInventoryItem item, XmlTextReader reader)
737 { 737 {
738 item.OldItemID = ReadUUID(reader, "OldItemID"); 738 ReadUUID(reader, "OldItemID");
739 // On deserialization, the old item id MUST BE UUID.Zero!!!!!
740 // Setting this to the saved value will BREAK script persistence!
741 // item.OldItemID = ReadUUID(reader, "OldItemID");
739 } 742 }
740 743
741 private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlTextReader reader) 744 private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlTextReader reader)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c251a49..cc3cf17 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2983,17 +2983,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2983 2983
2984 if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0) 2984 if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0)
2985 { 2985 {
2986 SceneObjectGroup grp = m_host.ParentGroup;
2987 UUID itemID = grp.GetFromItemID();
2988
2989 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
2990
2991 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; 2986 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
2992 if (attachmentsModule != null) 2987 if (attachmentsModule != null)
2993 attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); 2988 Util.FireAndForget(DetachWrapper, m_host);
2994 } 2989 }
2995 } 2990 }
2996 2991
2992 private void DetachWrapper(object o)
2993 {
2994 SceneObjectPart host = (SceneObjectPart)o;
2995
2996 SceneObjectGroup grp = host.ParentGroup;
2997 UUID itemID = grp.GetFromItemID();
2998 ScenePresence presence = World.GetScenePresence(host.OwnerID);
2999
3000 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
3001 if (attachmentsModule != null)
3002 attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient);
3003 }
3004
2997 public void llTakeCamera(string avatar) 3005 public void llTakeCamera(string avatar)
2998 { 3006 {
2999 m_host.AddScriptLPS(1); 3007 m_host.AddScriptLPS(1);