From f9646a0c813545a6ea156e125764ba7aec191b1e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 9 Apr 2008 15:33:04 +0000 Subject: From: Michael Osias "This is llDetectedKey for touch_start - it is already implemented for sensor." Thanks Michael --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 25 ++++++++++++++++------ .../Common/ScriptEngineBase/EventManager.cs | 5 ++++- 2 files changed, 23 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 1968f8e..03851b6 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -454,6 +454,19 @@ namespace OpenSim.Region.ScriptEngine.Common return SensedUUID; } } + else + { + ScriptManager sm; + IScript script = null; + + if ((sm = m_ScriptEngine.m_ScriptManager) != null) + if (sm.Scripts.ContainsKey(m_localID)) + if ((script = sm.GetScript(m_localID, m_itemID)) != null) + if (script.llDetectParams._key[0] != null) + return new LLUUID( + script.llDetectParams._key[0] + ); + } return LLUUID.Zero; } @@ -1974,7 +1987,7 @@ namespace OpenSim.Region.ScriptEngine.Common object[] resobj = new object[] { - m_host.LinkNum, num, msg, id + m_host.LinkNum + 1, num, msg, id }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( @@ -2001,7 +2014,7 @@ namespace OpenSim.Region.ScriptEngine.Common partItemID = item.ItemID; Object[] resobj = new object[] { - m_host.LinkNum, num, msg, id + m_host.LinkNum + 1, num, msg, id }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( @@ -2029,7 +2042,7 @@ namespace OpenSim.Region.ScriptEngine.Common partItemID = item.ItemID; Object[] resobj = new object[] { - m_host.LinkNum, num, msg, id + m_host.LinkNum + 1, num, msg, id }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( @@ -2059,7 +2072,7 @@ namespace OpenSim.Region.ScriptEngine.Common partItemID = item.ItemID; Object[] resobj = new object[] { - m_host.LinkNum, num, msg, id + m_host.LinkNum + 1, num, msg, id }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( @@ -2077,7 +2090,7 @@ namespace OpenSim.Region.ScriptEngine.Common Object[] respObjThis = new object[] { - m_host.LinkNum, num, msg, id + m_host.LinkNum + 1, num, msg, id }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( @@ -2102,7 +2115,7 @@ namespace OpenSim.Region.ScriptEngine.Common partItemID = item.ItemID; Object[] resObjDef = new object[] { - m_host.LinkNum, num, msg, id + m_host.LinkNum + 1, num, msg, id }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 763cc76..2f2b384 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -90,7 +90,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) { // Add to queue for all scripts in ObjectID object - myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", EventQueueManager.llDetectNull, new object[] { (int)1 }); + EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct(); + detstruct._key = new LSL_Types.key[1]; + detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); + myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", detstruct, new object[] { (int)1 }); } public void OnRezScript(uint localID, LLUUID itemID, string script) -- cgit v1.1