aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs20
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 8f05359..c602307 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3213,17 +3213,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3213 3213
3214 if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0) 3214 if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0)
3215 { 3215 {
3216 SceneObjectGroup grp = m_host.ParentGroup;
3217 UUID itemID = grp.GetFromItemID();
3218
3219 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
3220
3221 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; 3216 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
3222 if (attachmentsModule != null) 3217 if (attachmentsModule != null)
3223 attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); 3218 Util.FireAndForget(DetachWrapper, m_host);
3224 } 3219 }
3225 } 3220 }
3226 3221
3222 private void DetachWrapper(object o)
3223 {
3224 SceneObjectPart host = (SceneObjectPart)o;
3225
3226 SceneObjectGroup grp = host.ParentGroup;
3227 UUID itemID = grp.GetFromItemID();
3228 ScenePresence presence = World.GetScenePresence(host.OwnerID);
3229
3230 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
3231 if (attachmentsModule != null)
3232 attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient);
3233 }
3234
3227 public void llTakeCamera(string avatar) 3235 public void llTakeCamera(string avatar)
3228 { 3236 {
3229 m_host.AddScriptLPS(1); 3237 m_host.AddScriptLPS(1);