From a3b67ec8c7fc5ee061dad779c9842f28a781549a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 22 Dec 2008 13:03:30 +0000 Subject: Fix "from" link number in single prims to 0. Previously, this was 1, causing sime scripts that expected the first param of the link_message to match llGetLinkNumber() to fail in single prims --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1d7dcee..6c22338 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3644,10 +3644,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { partItemID = item.ItemID; + linkNumber = m_host.LinkNum; + if(m_host.ParentGroup.Children.Count == 1) + linkNumber = 0; + object[] resobj = new object[] { - new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id) + new LSL_Integer(linkNumber), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id) }; m_ScriptEngine.PostScriptEvent(partItemID, -- cgit v1.1