From 24d06b12c2c361305dfcfd78497abb4bec3e3a38 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 25 Aug 2010 23:05:54 +0100 Subject: If setting SOG.UUID, update the SOG.m_parts index as well as the root part UUID Being able to change a SOG.UUID is useful for region modules that want to supply their own UUID, before the object is rezzed --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 117f869..952d280 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -335,7 +335,16 @@ namespace OpenSim.Region.Framework.Scenes public override UUID UUID { get { return m_rootPart.UUID; } - set { m_rootPart.UUID = value; } + set + { + m_rootPart.UUID = value; + + lock (m_parts) + { + m_parts.Remove(m_rootPart.UUID); + m_parts.Add(m_rootPart.UUID, m_rootPart); + } + } } public UUID OwnerID -- cgit v1.1