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.
0.6.0-stable
Melanie Thielker 2008-07-23 18:37:43 +00:00
parent f079af87dc
commit db06e628de
2 changed files with 9 additions and 35 deletions

View File

@ -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;

View File

@ -5085,30 +5085,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
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);
if(m_host.ParentGroup == null)
return;
SceneObjectPart part=null;
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;