aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs14
1 files changed, 1 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 7009548..4645e7a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -330,14 +330,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
330 return key; 330 return key;
331 } 331 }
332 332
333 // convert a LSL_Rotation to a Quaternion
334 public static Quaternion Rot2Quaternion(LSL_Rotation r)
335 {
336 Quaternion q = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s);
337 q.Normalize();
338 return q;
339 }
340
341 //These are the implementations of the various ll-functions used by the LSL scripts. 333 //These are the implementations of the various ll-functions used by the LSL scripts.
342 public LSL_Float llSin(double f) 334 public LSL_Float llSin(double f)
343 { 335 {
@@ -6532,12 +6524,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6532 6524
6533 protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot) 6525 protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot)
6534 { 6526 {
6535 // LSL quaternions can normalize to 0, normal Quaternions can't.
6536 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
6537 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
6538
6539 part.SitTargetPosition = offset; 6527 part.SitTargetPosition = offset;
6540 part.SitTargetOrientation = Rot2Quaternion(rot); 6528 part.SitTargetOrientation = rot;
6541 part.ParentGroup.HasGroupChanged = true; 6529 part.ParentGroup.HasGroupChanged = true;
6542 } 6530 }
6543 6531