From dc0a19f7370b10ea5affd55d03b05a3aa2748839 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 9 Jul 2009 16:53:55 +0000 Subject: 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. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1d71da3..15188c5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -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)); } -- cgit v1.1