mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user