Detach dropped attachments from the scene presence so they don't get cleaned

on logout
0.6.1-post-fixes
Melanie Thielker 2008-11-14 15:30:15 +00:00
parent 3e4b094921
commit b43c056c5f
1 changed files with 5 additions and 0 deletions

View File

@ -789,6 +789,11 @@ namespace OpenSim.Region.Environment.Scenes
public void DetachToGround() public void DetachToGround()
{ {
ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar);
if (avatar == null)
return;
avatar.RemoveAttachment(this);
Vector3 detachedpos = new Vector3(127f,127f,127f); Vector3 detachedpos = new Vector3(127f,127f,127f);
if (avatar == null) if (avatar == null)
return; return;