diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 039d0744cb..ddebd0b4d4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2483,7 +2483,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (SceneObjectPart p in sceneObject.Children.Values) p.LocalId = 0; - if ((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0)) // Attachment + if (sceneObject.IsAttachmentCheckFull()) // Attachment { sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); sceneObject.RootPart.AddFlag(PrimFlags.Phantom); @@ -2518,9 +2518,7 @@ namespace OpenSim.Region.Framework.Scenes AttachObject( sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); RootPrim.RemFlag(PrimFlags.TemporaryOnRez); - grp.SendGroupFullUpdate(); - - + grp.SendGroupFullUpdate(); } else { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8c568707aa..af466593bc 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -268,7 +268,16 @@ namespace OpenSim.Region.Framework.Scenes } } - private bool IsAttachmentCheckFull() + /// + /// Check both the attachment property and the relevant properties of the underlying root part. + /// + /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't + /// have the IsAttachment property yet checked. + /// + /// FIXME: However, this should be fixed so that this property + /// propertly reflects the underlying status. + /// + public bool IsAttachmentCheckFull() { return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); }