From 0a2425432a9b2d6b12372fb41c178cd2137e6ba5 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 1 Dec 2007 21:52:10 +0000 Subject: 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(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 368d030..759d070 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 24fc484..193677e 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); + } + } /// /// /// -- cgit v1.1