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); + } + } /// /// ///