aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authoridb2009-01-23 18:10:31 +0000
committeridb2009-01-23 18:10:31 +0000
commit04a565e6b10dbaf228362cdfd3a410f1c0f0f713 (patch)
tree1287cda9a38256050d9d0ed50a71faaac2acd64d /OpenSim/Region/ScriptEngine
parentrefactor: move test modules set up code to common function (diff)
downloadopensim-SC_OLD-04a565e6b10dbaf228362cdfd3a410f1c0f0f713.zip
opensim-SC_OLD-04a565e6b10dbaf228362cdfd3a410f1c0f0f713.tar.gz
opensim-SC_OLD-04a565e6b10dbaf228362cdfd3a410f1c0f0f713.tar.bz2
opensim-SC_OLD-04a565e6b10dbaf228362cdfd3a410f1c0f0f713.tar.xz
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')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
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: