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