From 04a565e6b10dbaf228362cdfd3a410f1c0f0f713 Mon Sep 17 00:00:00 2001 From: idb Date: Fri, 23 Jan 2009 18:10:31 +0000 Subject: Fix for llGetRot when the script is in a child prim. Also fixed llGetPrimitiveParams for PRIM_ROTATION. Fixes Mantis #3023 --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 51393a9..df3a3dc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1857,6 +1857,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; } + /// + /// See http://lslwiki.net/lslwiki/wakka.php?wakka=ChildRotation + /// public LSL_Rotation llGetRot() { // unlinked or root prim then use llRootRotation @@ -1866,7 +1869,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return llGetRootRotation(); } m_host.AddScriptLPS(1); - Quaternion q = m_host.RotationOffset; + Quaternion q = m_host.GetWorldRotation(); return new LSL_Rotation(q.X, q.Y, q.Z, q.W); } @@ -6816,10 +6819,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.PRIM_ROTATION: - res.Add(new LSL_Rotation(m_host.RotationOffset.X, - m_host.RotationOffset.Y, - m_host.RotationOffset.Z, - m_host.RotationOffset.W)); + res.Add(llGetRot()); break; case (int)ScriptBaseClass.PRIM_TYPE: -- cgit v1.1