diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c251a49..cc3cf17 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2983,17 +2983,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2983 | 2983 | ||
2984 | if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0) | 2984 | if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0) |
2985 | { | 2985 | { |
2986 | SceneObjectGroup grp = m_host.ParentGroup; | ||
2987 | UUID itemID = grp.GetFromItemID(); | ||
2988 | |||
2989 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | ||
2990 | |||
2991 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; | 2986 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; |
2992 | if (attachmentsModule != null) | 2987 | if (attachmentsModule != null) |
2993 | attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); | 2988 | Util.FireAndForget(DetachWrapper, m_host); |
2994 | } | 2989 | } |
2995 | } | 2990 | } |
2996 | 2991 | ||
2992 | private void DetachWrapper(object o) | ||
2993 | { | ||
2994 | SceneObjectPart host = (SceneObjectPart)o; | ||
2995 | |||
2996 | SceneObjectGroup grp = host.ParentGroup; | ||
2997 | UUID itemID = grp.GetFromItemID(); | ||
2998 | ScenePresence presence = World.GetScenePresence(host.OwnerID); | ||
2999 | |||
3000 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; | ||
3001 | if (attachmentsModule != null) | ||
3002 | attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); | ||
3003 | } | ||
3004 | |||
2997 | public void llTakeCamera(string avatar) | 3005 | public void llTakeCamera(string avatar) |
2998 | { | 3006 | { |
2999 | m_host.AddScriptLPS(1); | 3007 | m_host.AddScriptLPS(1); |