From 0a2425432a9b2d6b12372fb41c178cd2137e6ba5 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 1 Dec 2007 21:52:10 +0000 Subject: [PATCH] Rezzing multiple copies of a inventory prim should now work. --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 1 + OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 368d030822..759d07091b 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -484,6 +484,7 @@ namespace OpenSim.Region.Environment.Scenes private void AddRezObject(string xmlData, LLVector3 pos) { SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); + group.GenerateNewIDs(); AddEntity(group); group.AbsolutePosition = pos; SceneObjectPart rootPart = group.GetChildPart(group.UUID); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 24fc484f96..193677e6a0 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -598,6 +598,17 @@ namespace OpenSim.Region.Environment.Scenes SetPartAsNonRoot(newPart); } + + public void GenerateNewIDs() + { + List partsList = new List(m_parts.Values); + m_parts.Clear(); + foreach (SceneObjectPart part in partsList) + { + part.UUID = LLUUID.Random(); + m_parts.Add(part.UUID, part); + } + } /// /// ///