From 3644879677a53d1d18319b826050949a6950a2a9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 28 Mar 2019 02:32:36 +0000 Subject: [PATCH] mantis 8508: ignore llAttachToAvatar if already attached --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ba35b55e4f..45efa77836 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3886,6 +3886,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_item.PermsGranter != m_host.OwnerID) return; + SceneObjectGroup grp = m_host.ParentGroup; + if (grp == null || grp.IsDeleted || grp.IsAttachment) + return; + if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0) AttachToAvatar(attachmentPoint); }