From e4fc55f71ef5e76bf267f91a9e34d669e24d8c80 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 8 Oct 2008 01:49:58 +0000 Subject: 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. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index cc22994..a33b5cf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -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)); } } -- cgit v1.1