Mantis#2352. Thank you kindly, Jonc for a patch that:

If prim is part of SOG, then ask the SOG to update the 
position, rather than asking the part itself.
Ghosted child prims should no longer result from llSetPos.
Not sure if this is the right approach for all cases ,
would appreciate feedback on the patch.
0.6.0-stable
Charles Krinke 2008-10-08 01:49:58 +00:00
parent e87195d1bd
commit e4fc55f71e
1 changed files with 4 additions and 2 deletions

View File

@ -1718,14 +1718,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
targetPos = currentPos + m_ScriptDistanceFactor * 10.0f * llVecNorm(targetPos - currentPos);
}
if (part.ParentID != 0)
if (part.ParentGroup == null)
{
part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
}
else
{
part.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
SceneObjectGroup parent = part.ParentGroup;
parent.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
}
}