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 | |
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 '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 23 |
2 files changed, 9 insertions, 35 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; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c7a7581..a747586 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5085,30 +5085,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5085 | 5085 | ||
5086 | public void llSetPrimitiveParams(LSL_Types.list rules) | 5086 | public void llSetPrimitiveParams(LSL_Types.list rules) |
5087 | { | 5087 | { |
5088 | llSetLinkPrimitiveParams(m_host.LinkNum+1, rules); | 5088 | llSetLinkPrimitiveParams(m_host.LinkNum, rules); |
5089 | } | 5089 | } |
5090 | 5090 | ||
5091 | public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) | 5091 | public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) |
5092 | { | 5092 | { |
5093 | m_host.AddScriptLPS(1); | 5093 | m_host.AddScriptLPS(1); |
5094 | |||
5095 | if(m_host.ParentGroup == null) | ||
5096 | return; | ||
5094 | 5097 | ||
5095 | SceneObjectPart part=null; | 5098 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
5096 | |||
5097 | if (m_host.LinkNum+1 != linknumber) | ||
5098 | { | ||
5099 | foreach (SceneObjectPart partInst in m_host.ParentGroup.GetParts()) | ||
5100 | { | ||
5101 | if ((partInst.LinkNum) == linknumber) | ||
5102 | { | ||
5103 | part = partInst; | ||
5104 | break; | ||
5105 | } | ||
5106 | } | ||
5107 | } | ||
5108 | else | ||
5109 | { | ||
5110 | part = m_host; | ||
5111 | } | ||
5112 | 5099 | ||
5113 | if (part == null) | 5100 | if (part == null) |
5114 | return; | 5101 | return; |