From b9c40320f108a84d7841cdc9e98009cf650f930e Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Wed, 16 Jun 2010 09:20:20 -0700 Subject: Fix llAttachToAvatar. This addresses mantis 128 . --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c332fd8..877c3cb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3065,9 +3065,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - if (m_host.ParentGroup.RootPart.AttachmentPoint == 0) - return; - TaskInventoryItem item; m_host.TaskInventory.LockItemsForRead(true); @@ -3093,11 +3090,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScenePresence presence = World.GetScenePresence(m_host.OwnerID); + /* IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; if (attachmentsModule != null) + { attachmentsModule.AttachObject( - presence.ControllingClient, grp.LocalId, + presence.ControllingClient, grp.LocalId, (uint)attachment, Quaternion.Identity, Vector3.Zero, false); + } + */ + grp.AttachToAgent(m_host.OwnerID, (uint)attachment, Vector3.Zero, false); } } -- cgit v1.1