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
Charles Krinke 2009-07-09 16:53:55 +00:00
parent 744196d9ba
commit dc0a19f737
1 changed files with 4 additions and 2 deletions

View File

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