diff options
author | Justin Clark-Casey (justincc) | 2011-08-11 23:28:14 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-11 23:28:14 +0100 |
commit | a21e98ae1a3e2f570cc119e020d4d4ea111e0ad2 (patch) | |
tree | a74d900e3d6ebc4b6fea7b2d4450505b960c4739 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Implement osAgentSaveAppearance() to save the appearance of an avatar in the ... (diff) | |
download | opensim-SC_OLD-a21e98ae1a3e2f570cc119e020d4d4ea111e0ad2.zip opensim-SC_OLD-a21e98ae1a3e2f570cc119e020d4d4ea111e0ad2.tar.gz opensim-SC_OLD-a21e98ae1a3e2f570cc119e020d4d4ea111e0ad2.tar.bz2 opensim-SC_OLD-a21e98ae1a3e2f570cc119e020d4d4ea111e0ad2.tar.xz |
implement osNpcGetRot() and osNpcSetRot()
Rotation works if done around the z axis. Anything else leads to random results.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 86ee28a..8a281d4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -369,7 +369,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
369 | } | 369 | } |
370 | 370 | ||
371 | // convert a LSL_Rotation to a Quaternion | 371 | // convert a LSL_Rotation to a Quaternion |
372 | protected Quaternion Rot2Quaternion(LSL_Rotation r) | 372 | public static Quaternion Rot2Quaternion(LSL_Rotation r) |
373 | { | 373 | { |
374 | Quaternion q = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); | 374 | Quaternion q = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); |
375 | q.Normalize(); | 375 | q.Normalize(); |
@@ -2061,6 +2061,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2061 | { | 2061 | { |
2062 | return llGetRootRotation(); | 2062 | return llGetRootRotation(); |
2063 | } | 2063 | } |
2064 | |||
2064 | m_host.AddScriptLPS(1); | 2065 | m_host.AddScriptLPS(1); |
2065 | Quaternion q = m_host.GetWorldRotation(); | 2066 | Quaternion q = m_host.GetWorldRotation(); |
2066 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | 2067 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); |