From db06e628de2653fc310c21f03adabd6ff35983b7 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 23 Jul 2008 18:37:43 +0000 Subject: Attempt to fix Mantis #1804 Fetches the correct link part to chenge. Please provide feedback, since I was not able to test all variants of this huge function. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index b8a214a..50691a5 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -5286,30 +5286,17 @@ namespace OpenSim.Region.ScriptEngine.Common public void llSetPrimitiveParams(LSL_Types.list rules) { - llSetLinkPrimitiveParams(m_host.LinkNum+1, rules); + llSetLinkPrimitiveParams(m_host.LinkNum, rules); } public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) { m_host.AddScriptLPS(1); - SceneObjectPart part=null; + if(m_host.ParentGroup == null) + return; - if (m_host.LinkNum+1 != linknumber) - { - foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts()) - { - if ((partInst.LinkNum) == linknumber) - { - part = partInst; - break; - } - } - } - else - { - part = m_host; - } + SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); if (part == null) return; -- cgit v1.1