diff options
Fix for llGetRot when the script is in a child prim. Also fixed llGetPrimitiveParams for PRIM_ROTATION.
Fixes Mantis #3023
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 5 insertions, 5 deletions
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 | |||
1857 | part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; | 1857 | part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; |
1858 | } | 1858 | } |
1859 | 1859 | ||
1860 | /// <summary> | ||
1861 | /// See http://lslwiki.net/lslwiki/wakka.php?wakka=ChildRotation | ||
1862 | /// </summary> | ||
1860 | public LSL_Rotation llGetRot() | 1863 | public LSL_Rotation llGetRot() |
1861 | { | 1864 | { |
1862 | // unlinked or root prim then use llRootRotation | 1865 | // unlinked or root prim then use llRootRotation |
@@ -1866,7 +1869,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1866 | return llGetRootRotation(); | 1869 | return llGetRootRotation(); |
1867 | } | 1870 | } |
1868 | m_host.AddScriptLPS(1); | 1871 | m_host.AddScriptLPS(1); |
1869 | Quaternion q = m_host.RotationOffset; | 1872 | Quaternion q = m_host.GetWorldRotation(); |
1870 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | 1873 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); |
1871 | } | 1874 | } |
1872 | 1875 | ||
@@ -6816,10 +6819,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6816 | break; | 6819 | break; |
6817 | 6820 | ||
6818 | case (int)ScriptBaseClass.PRIM_ROTATION: | 6821 | case (int)ScriptBaseClass.PRIM_ROTATION: |
6819 | res.Add(new LSL_Rotation(m_host.RotationOffset.X, | 6822 | res.Add(llGetRot()); |
6820 | m_host.RotationOffset.Y, | ||
6821 | m_host.RotationOffset.Z, | ||
6822 | m_host.RotationOffset.W)); | ||
6823 | break; | 6823 | break; |
6824 | 6824 | ||
6825 | case (int)ScriptBaseClass.PRIM_TYPE: | 6825 | case (int)ScriptBaseClass.PRIM_TYPE: |