diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index bccbe683f7..19a95062b4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3361,8 +3361,6 @@ namespace OpenSim.Region.Framework.Scenes { SceneObjectGroup sog = Copy(false); sog.m_isDeleted = false; - sog.RootPart.IsAttachment = false; - sog.RootPart.GroupPosition = sog.RootPart.AttachedPos; return sog; } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 507fc50f99..fe4a7d1fa7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3108,6 +3108,9 @@ namespace OpenSim.Region.Framework.Scenes // We need to make a copy and pass that copy // because of transfers withn the same sim ISceneObject clone = sog.CloneForNewScene(); + // Attachment module assumes that GroupPosition holds the offsets...! + ((SceneObjectGroup)clone).RootPart.GroupPosition = sog.RootPart.AttachedPos; + ((SceneObjectGroup)clone).RootPart.IsAttachment = false; cAgent.AttachmentObjects.Add(clone); cAgent.AttachmentObjectStates.Add(sog.GetStateSnapshot()); }