From f7b28dd32155eac2d55ccf0757b059794d6b5f67 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 7 Sep 2010 03:41:29 +0100 Subject: If a scene object part UUID is changed (only possible when not in a scene), then adjust the inventory items to point to the new uuid as well --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3ed74e1..3753dcb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -494,7 +494,14 @@ namespace OpenSim.Region.Framework.Scenes public UUID UUID { get { return m_uuid; } - set { m_uuid = value; } + set + { + m_uuid = value; + + // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part + if (Inventory != null) + Inventory.ResetInventoryIDs(); + } } public uint LocalId @@ -2756,7 +2763,6 @@ namespace OpenSim.Region.Framework.Scenes UUID = UUID.Random(); LinkNum = linkNum; LocalId = 0; - Inventory.ResetInventoryIDs(); } /// -- cgit v1.1 From f1f0bc23f4501ba99035283d3407ddad2b21b785 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 12 Sep 2010 13:43:49 -0400 Subject: Formatting cleanup. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3753dcb..024bdc9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1010,12 +1010,12 @@ namespace OpenSim.Region.Framework.Scenes return m_mediaUrl; } - set - { + set + { m_mediaUrl = value; if (ParentGroup != null) - ParentGroup.HasGroupChanged = true; + ParentGroup.HasGroupChanged = true; } } @@ -1028,7 +1028,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); m_createSelected = value; } - } + } #endregion @@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Property flags. See OpenMetaverse.PrimFlags - /// + /// /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge public PrimFlags Flags { @@ -1355,7 +1355,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Tell the scene presence that it should send updates for this part to its client - /// + /// public void AddFullUpdateToAvatar(ScenePresence presence) { presence.SceneViewer.QueuePartForUpdate(this); @@ -1414,7 +1414,7 @@ namespace OpenSim.Region.Framework.Scenes m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) { - if(!sp.IsChildAgent) + if (!sp.IsChildAgent) sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); }); } @@ -1659,7 +1659,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); - return dupe; + return dupe; } protected void AssetReceived(string id, Object sender, AssetBase asset) @@ -1969,10 +1969,10 @@ namespace OpenSim.Region.Framework.Scenes } public uint GetEffectiveObjectFlags() - { + { // Commenting this section of code out since it doesn't actually do anything, as enums are handled by // value rather than reference -// PrimFlags f = _flags; +// PrimFlags f = _flags; // if (m_parentGroup == null || m_parentGroup.RootPart == this) // f &= ~(PrimFlags.Touch | PrimFlags.Money); @@ -4733,7 +4733,7 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null || ParentGroup.IsDeleted) return; - if (IsAttachment && ParentGroup.RootPart != this) + if (IsAttachment && ParentGroup.RootPart != this) return; // Causes this thread to dig into the Client Thread Data. -- cgit v1.1