diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 6cd0bae..18322ee 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -766,19 +766,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
766 | { | 766 | { |
767 | ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); | 767 | ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); |
768 | Vector3 detachedpos = new Vector3(127f,127f,127f); | 768 | Vector3 detachedpos = new Vector3(127f,127f,127f); |
769 | if (avatar != null) | 769 | if (avatar == null) |
770 | { | 770 | return; |
771 | detachedpos = avatar.AbsolutePosition; | 771 | |
772 | avatar.RemoveAttachment(this); | 772 | detachedpos = avatar.AbsolutePosition; |
773 | } | 773 | |
774 | AbsolutePosition = detachedpos; | 774 | AbsolutePosition = detachedpos; |
775 | m_rootPart.AttachedAvatar = UUID.Zero; | 775 | m_rootPart.AttachedAvatar = UUID.Zero; |
776 | m_rootPart.SetParentLocalId(0); | 776 | m_rootPart.SetParentLocalId(0); |
777 | SetAttachmentPoint((byte)0); | 777 | SetAttachmentPoint((byte)0); |
778 | m_rootPart.IsAttachment = false; | ||
779 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); | 778 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); |
780 | HasGroupChanged = true; | 779 | HasGroupChanged = true; |
781 | AttachToBackup(); | 780 | AttachToBackup(); |
781 | m_scene.EventManager.TriggerParcelPrimCountTainted(); | ||
782 | m_rootPart.ScheduleFullUpdate(); | 782 | m_rootPart.ScheduleFullUpdate(); |
783 | m_rootPart.ClearUndoState(); | 783 | m_rootPart.ClearUndoState(); |
784 | } | 784 | } |