aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2493ed8..ba318a8 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -663,9 +663,11 @@ namespace OpenSim.Region.Environment.Scenes
663 { 663 {
664 m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor); 664 m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor);
665 m_rootPart.PhysActor = null; 665 m_rootPart.PhysActor = null;
666 AbsolutePosition = AttachOffset; 666
667 m_rootPart.m_attachedPos = AttachOffset;
668 } 667 }
668
669 AbsolutePosition = AttachOffset;
670 m_rootPart.m_attachedPos = AttachOffset;
669 m_rootPart.m_IsAttachment = true; 671 m_rootPart.m_IsAttachment = true;
670 672
671 m_rootPart.SetParentLocalId(avatar.LocalId); 673 m_rootPart.SetParentLocalId(avatar.LocalId);
@@ -702,6 +704,26 @@ namespace OpenSim.Region.Environment.Scenes
702 AttachToBackup(); 704 AttachToBackup();
703 m_rootPart.ScheduleFullUpdate(); 705 m_rootPart.ScheduleFullUpdate();
704 } 706 }
707 public void DetachToInventoryPrep()
708 {
709 ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.m_attachedAvatar);
710 //LLVector3 detachedpos = new LLVector3(127f, 127f, 127f);
711 if (avatar != null)
712 {
713 //detachedpos = avatar.AbsolutePosition;
714 avatar.RemoveAttachment(this);
715 }
716
717 m_rootPart.m_attachedAvatar = LLUUID.Zero;
718 m_rootPart.SetParentLocalId(0);
719 //m_rootPart.SetAttachmentPoint((byte)0);
720 m_rootPart.m_IsAttachment = false;
721 AbsolutePosition = m_rootPart.m_attachedPos;
722 //m_rootPart.ApplyPhysics(m_rootPart.ObjectFlags, m_scene.m_physicalPrim);
723 //AttachToBackup();
724 //m_rootPart.ScheduleFullUpdate();
725
726 }
705 /// <summary> 727 /// <summary>
706 /// 728 ///
707 /// </summary> 729 /// </summary>