aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs16
2 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index b5e2c40..d41ede1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1276,7 +1276,7 @@ namespace OpenSim.Region.Environment.Scenes
1276 { 1276 {
1277 if (group.RootPart.Shape.PCode == (byte)PCode.Prim) 1277 if (group.RootPart.Shape.PCode == (byte)PCode.Prim)
1278 { 1278 {
1279 group.RootPart.Shape.State = (byte)0; 1279 group.ClearPartAttachmentData();
1280 } 1280 }
1281 group.ApplyPhysics(m_physicalPrim); 1281 group.ApplyPhysics(m_physicalPrim);
1282 } 1282 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 4711701..c5fdcaf 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -673,7 +673,13 @@ namespace OpenSim.Region.Environment.Scenes
673 m_rootPart.m_IsAttachment = true; 673 m_rootPart.m_IsAttachment = true;
674 674
675 m_rootPart.SetParentLocalId(avatar.LocalId); 675 m_rootPart.SetParentLocalId(avatar.LocalId);
676 m_rootPart.SetAttachmentPoint(attachmentpoint); 676 lock (m_parts)
677 {
678 foreach (SceneObjectPart part in m_parts.Values)
679 {
680 part.SetAttachmentPoint(attachmentpoint);
681 }
682 }
677 683
678 avatar.AddAttachment(this); 684 avatar.AddAttachment(this);
679 m_rootPart.ScheduleFullUpdate(); 685 m_rootPart.ScheduleFullUpdate();
@@ -688,6 +694,14 @@ namespace OpenSim.Region.Environment.Scenes
688 return (byte)0; 694 return (byte)0;
689 } 695 }
690 696
697 public void ClearPartAttachmentData()
698 {
699 foreach (SceneObjectPart part in m_parts.Values)
700 {
701 part.SetAttachmentPoint((Byte)0);
702 }
703 }
704
691 public void DetachToGround() 705 public void DetachToGround()
692 { 706 {
693 ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.m_attachedAvatar); 707 ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.m_attachedAvatar);