From 9cf8795ecf1a2f34f803babf318d9c1f394ee18b Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 19 Sep 2010 22:53:05 +0200 Subject: [PATCH] Fix a merge artefact that broke script state persistence in XAttachments --- OpenSim/Framework/TaskInventoryItem.cs | 8 +++----- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index df5b936126..883f61a3e8 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs @@ -120,7 +120,7 @@ namespace OpenSim.Framework private UUID _permsGranter; private int _permsMask; private int _type = 0; - private UUID _oldID; + private UUID _oldID = UUID.Zero; private bool _ownerChanged = false; @@ -227,9 +227,6 @@ namespace OpenSim.Framework get { return _oldID; } - set { - _oldID = value; - } } public UUID LastOwnerID { @@ -348,7 +345,8 @@ namespace OpenSim.Framework /// The new part ID to which this item belongs public void ResetIDs(UUID partID) { - OldItemID = ItemID; + if (_oldID == UUID.Zero) + _oldID = ItemID; ItemID = UUID.Random(); ParentPartID = partID; ParentID = partID; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f9bfffd629..41b0a42472 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1029,7 +1029,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) { - Dictionary pstates = parts[i].Inventory.GetScriptStates(); + Dictionary pstates = parts[i].Inventory.GetScriptStates(oldIDs); foreach (KeyValuePair kvp in pstates) states.Add(kvp.Key, kvp.Value); }