diff options
author | Melanie | 2012-07-29 15:40:31 +0200 |
---|---|---|
committer | Melanie | 2012-07-29 15:40:31 +0200 |
commit | 88d68e68c19107701ca8fbfb73413e0ea978b862 (patch) | |
tree | cfe27f7cb4c625cbaf3b0b190d43f2839bc89106 /OpenSim/Region | |
parent | Fix an exception while outputting a log message (diff) | |
download | opensim-SC_OLD-88d68e68c19107701ca8fbfb73413e0ea978b862.zip opensim-SC_OLD-88d68e68c19107701ca8fbfb73413e0ea978b862.tar.gz opensim-SC_OLD-88d68e68c19107701ca8fbfb73413e0ea978b862.tar.bz2 opensim-SC_OLD-88d68e68c19107701ca8fbfb73413e0ea978b862.tar.xz |
Return world rotation on llGetObjectDetails()'s OBJECT_ROT
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fac249e..cd72dc2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -11846,11 +11846,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11846 | ret.Add(new LSL_Vector(opos.X, opos.Y, opos.Z)); | 11846 | ret.Add(new LSL_Vector(opos.X, opos.Y, opos.Z)); |
11847 | break; | 11847 | break; |
11848 | case ScriptBaseClass.OBJECT_ROT: | 11848 | case ScriptBaseClass.OBJECT_ROT: |
11849 | // Quaternion orot = obj.RotationOffset; | 11849 | { |
11850 | // ret.Add(new LSL_Rotation(orot.X, orot.Y, orot.Z, orot.W)); | 11850 | Quaternion rot = Quaternion.Identity; |
11851 | |||
11852 | if (obj.ParentGroup.RootPart == obj) | ||
11853 | rot = obj.ParentGroup.GroupRotation; | ||
11854 | else | ||
11855 | rot = obj.GetWorldRotation(); | ||
11851 | 11856 | ||
11852 | LSL_Rotation objrot = GetPartRot(obj); | 11857 | LSL_Rotation objrot = new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); |
11853 | ret.Add(objrot); | 11858 | ret.Add(objrot); |
11859 | } | ||
11854 | break; | 11860 | break; |
11855 | case ScriptBaseClass.OBJECT_VELOCITY: | 11861 | case ScriptBaseClass.OBJECT_VELOCITY: |
11856 | Vector3 ovel = obj.Velocity; | 11862 | Vector3 ovel = obj.Velocity; |