diff options
author | Melanie Thielker | 2008-07-23 18:37:43 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-07-23 18:37:43 +0000 |
commit | db06e628de2653fc310c21f03adabd6ff35983b7 (patch) | |
tree | e6708d49126c8dc5db731e6fa9f3acc1f8fae42b /OpenSim/Region/ScriptEngine/Common | |
parent | Fix Mantis #1759 (diff) | |
download | opensim-SC-db06e628de2653fc310c21f03adabd6ff35983b7.zip opensim-SC-db06e628de2653fc310c21f03adabd6ff35983b7.tar.gz opensim-SC-db06e628de2653fc310c21f03adabd6ff35983b7.tar.bz2 opensim-SC-db06e628de2653fc310c21f03adabd6ff35983b7.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 21 |
1 files changed, 4 insertions, 17 deletions
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 | |||
5286 | 5286 | ||
5287 | public void llSetPrimitiveParams(LSL_Types.list rules) | 5287 | public void llSetPrimitiveParams(LSL_Types.list rules) |
5288 | { | 5288 | { |
5289 | llSetLinkPrimitiveParams(m_host.LinkNum+1, rules); | 5289 | llSetLinkPrimitiveParams(m_host.LinkNum, rules); |
5290 | } | 5290 | } |
5291 | 5291 | ||
5292 | public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) | 5292 | public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) |
5293 | { | 5293 | { |
5294 | m_host.AddScriptLPS(1); | 5294 | m_host.AddScriptLPS(1); |
5295 | 5295 | ||
5296 | SceneObjectPart part=null; | 5296 | if(m_host.ParentGroup == null) |
5297 | return; | ||
5297 | 5298 | ||
5298 | if (m_host.LinkNum+1 != linknumber) | 5299 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
5299 | { | ||
5300 | foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts()) | ||
5301 | { | ||
5302 | if ((partInst.LinkNum) == linknumber) | ||
5303 | { | ||
5304 | part = partInst; | ||
5305 | break; | ||
5306 | } | ||
5307 | } | ||
5308 | } | ||
5309 | else | ||
5310 | { | ||
5311 | part = m_host; | ||
5312 | } | ||
5313 | 5300 | ||
5314 | if (part == null) | 5301 | if (part == null) |
5315 | return; | 5302 | return; |