From 002313bf132e7eca3d33fdd0c695152146d469b4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 26 Aug 2011 22:02:23 +0100 Subject: refactor: move sog.DetachToInventoryPrep() into AttachmentsModule.DetachSingleAttachmentToInv() --- .../Region/Framework/Scenes/SceneObjectGroup.cs | 32 +++------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8f0fa55..00e3363 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -147,15 +147,16 @@ namespace OpenSim.Region.Framework.Scenes return false; } - /// + /// /// Is this scene object acting as an attachment? - /// + /// + /// /// We return false if the group has already been deleted. /// /// TODO: At the moment set must be done on the part itself. There may be a case for doing it here since I /// presume either all or no parts in a linkset can be part of an attachment (in which /// case the value would get proprogated down into all the descendent parts). - /// + /// public bool IsAttachment { get @@ -1017,31 +1018,6 @@ namespace OpenSim.Region.Framework.Scenes m_rootPart.ClearUndoState(); } - public void DetachToInventoryPrep() - { - ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); - //Vector3 detachedpos = new Vector3(127f, 127f, 127f); - if (avatar != null) - { - //detachedpos = avatar.AbsolutePosition; - avatar.RemoveAttachment(this); - } - - m_rootPart.AttachedAvatar = UUID.Zero; - - SceneObjectPart[] parts = m_parts.GetArray(); - for (int i = 0; i < parts.Length; i++) - parts[i].AttachedAvatar = UUID.Zero; - - m_rootPart.SetParentLocalId(0); - //m_rootPart.SetAttachmentPoint((byte)0); - m_rootPart.IsAttachment = false; - AbsolutePosition = m_rootPart.AttachedPos; - //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); - //AttachToBackup(); - //m_rootPart.ScheduleFullUpdate(); - } - /// /// /// -- cgit v1.1