From 117fd629d68ef8ab373b70fd5e9e6a643e8eaa65 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Wed, 16 Jun 2010 08:32:47 -0700 Subject: Allow llMapDestination to be used in any event if the host is an attachment. This fixes Mantis 0000098. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9f3e354..c332fd8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -9470,8 +9470,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, 0); - if (detectedParams == null) return; // only works on the first detected avatar - + if (detectedParams == null) + { + if (m_host.IsAttachment == true) + { + detectedParams = new DetectParams(); + detectedParams.Key = m_host.OwnerID; + } + else + { + return; + } + } + ScenePresence avatar = World.GetScenePresence(detectedParams.Key); if (avatar != null) { @@ -9479,6 +9490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); } + ScriptSleep(1000); } -- cgit v1.1 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(-) 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