aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDahlia Trimble2009-05-21 19:44:20 +0000
committerDahlia Trimble2009-05-21 19:44:20 +0000
commit3d0f110f21078a0b96b0d21b6a5ee1e27ce291c9 (patch)
tree0080524b010b7b95a410ec3bdd45e3f941ff0ca5
parentHooked up the RestRegionPlugin Get Region/xxx/terrain so it outputs xml conta... (diff)
downloadopensim-SC_OLD-3d0f110f21078a0b96b0d21b6a5ee1e27ce291c9.zip
opensim-SC_OLD-3d0f110f21078a0b96b0d21b6a5ee1e27ce291c9.tar.gz
opensim-SC_OLD-3d0f110f21078a0b96b0d21b6a5ee1e27ce291c9.tar.bz2
opensim-SC_OLD-3d0f110f21078a0b96b0d21b6a5ee1e27ce291c9.tar.xz
normalize quats before applying llSetRot()
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
1 files changed, 3 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 5b6f23a..519dd2b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -347,7 +347,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
347 // convert a LSL_Rotation to a Quaternion 347 // convert a LSL_Rotation to a Quaternion
348 private Quaternion Rot2Quaternion(LSL_Rotation r) 348 private Quaternion Rot2Quaternion(LSL_Rotation r)
349 { 349 {
350 return new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); 350 Quaternion q = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s);
351 q.Normalize();
352 return q;
351 } 353 }
352 354
353 //These are the implementations of the various ll-functions used by the LSL scripts. 355 //These are the implementations of the various ll-functions used by the LSL scripts.