diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 8fc438d502..49e98e7d3a 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Framework.Scenes if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) { // Set the new attachment point data in the object - byte attachmentPoint = group.GetAttachmentPoint(); + byte attachmentPoint = (byte)group.AttachmentPoint; group.UpdateGroupPosition(pos); group.IsAttachment = false; group.AbsolutePosition = group.RootPart.AttachedPos; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 83c5db4a01..dff242e213 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1783,63 +1783,6 @@ namespace OpenSim.Region.Framework.Scenes } } - /// - /// Attach this scene object to the given avatar. - /// - /// - /// - /// - private void AttachToAgent( - ScenePresence avatar, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) - { - if (avatar != null) - { - // don't attach attachments to child agents - if (avatar.IsChildAgent) return; - - // Remove from database and parcel prim count - m_scene.DeleteFromStorage(so.UUID); - m_scene.EventManager.TriggerParcelPrimCountTainted(); - - so.AttachedAvatar = avatar.UUID; - - if (so.RootPart.PhysActor != null) - { - m_scene.PhysicsScene.RemovePrim(so.RootPart.PhysActor); - so.RootPart.PhysActor = null; - } - - so.AbsolutePosition = attachOffset; - so.RootPart.AttachedPos = attachOffset; - so.IsAttachment = true; - so.RootPart.SetParentLocalId(avatar.LocalId); - so.AttachmentPoint = attachmentpoint; - - avatar.AddAttachment(this); - - if (!silent) - { - // Killing it here will cause the client to deselect it - // It then reappears on the avatar, deselected - // through the full update below - // - if (IsSelected) - { - m_scene.SendKillObject(new List { m_rootPart.LocalId }); - } - - IsSelected = false; // fudge.... - ScheduleGroupForFullUpdate(); - } - } - else - { - m_log.WarnFormat( - "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", - UUID, avatar.ControllingClient.AgentId, Scene.RegionInfo.RegionName); - } - } - public byte GetAttachmentPoint() { return m_rootPart.Shape.State;