From b43c056c5f96337eb2ae07da7817250efc4141df Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 14 Nov 2008 15:30:15 +0000 Subject: Detach dropped attachments from the scene presence so they don't get cleaned on logout --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 4f00843..c51f235 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -789,6 +789,11 @@ namespace OpenSim.Region.Environment.Scenes public void DetachToGround() { ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); + if (avatar == null) + return; + + avatar.RemoveAttachment(this); + Vector3 detachedpos = new Vector3(127f,127f,127f); if (avatar == null) return; -- cgit v1.1