Thank you kindly, Godfrey, for a patch that:
The vector parameter to llSetPos() specifies an absolute position for an unlinked prim or the root prim of a linkset; however, when the function is used by a child prim, the vector specifies a relative offset from the root prim. The changed introduced in llSetPos() treats this value as an absolute position in all cases, which has the unintended effect of mangling the position of child prims.trunk
parent
744196d9ba
commit
dc0a19f737
|
@ -1859,15 +1859,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
|
||||
bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true);
|
||||
|
||||
if ((targetPos.z < ground) && disable_underground_movement)
|
||||
targetPos.z = ground;
|
||||
|
||||
if (part.ParentGroup == null)
|
||||
{
|
||||
if ((targetPos.z < ground) && disable_underground_movement)
|
||||
targetPos.z = ground;
|
||||
part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
|
||||
}
|
||||
else if (part.ParentGroup.RootPart == part)
|
||||
{
|
||||
if ((targetPos.z < ground) && disable_underground_movement)
|
||||
targetPos.z = ground;
|
||||
SceneObjectGroup parent = part.ParentGroup;
|
||||
parent.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue