From 88496374935d9d70278f6b8b6051e1be7b92011a Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Fri, 14 Sep 2007 08:57:13 +0000
Subject: more fun with LSL implementations

---
 .../Compiler/Server_API/LSL_BuiltIn_Commands.cs    | 27 +++++++++-------------
 1 file changed, 11 insertions(+), 16 deletions(-)

(limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler')

diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 10b5181..028544e 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -243,24 +243,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
             LLVector3 tmp;
             if (m_host.ParentID != 0) 
             {
-                tmp = m_host.OffsetPosition;
+                m_host.UpdateOffSet(new LLVector3((float)pos.X, (float)pos.Y, (float)pos.Z));
             } 
             else
             {
-                tmp = m_host.GroupPosition;
+                m_host.UpdateGroupPosition(new LLVector3((float)pos.X, (float)pos.Y, (float)pos.Z));
             }
-            tmp.X = (float)pos.X;
-            tmp.Y = (float)pos.Y;
-            tmp.Z = (float)pos.Z;
-            if (m_host.ParentID != 0) 
-            {
-                m_host.OffsetPosition = tmp;
-            } 
-            else
-            {
-                m_host.GroupPosition = tmp;
-            }
-            return; 
         }
 
         public LSL_Types.Vector3 llGetPos()
@@ -282,8 +270,15 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
                                              m_host.AbsolutePosition.Z); 
             }
         }
-        public void llSetRot(LSL_Types.Quaternion rot) { }
-        public LSL_Types.Quaternion llGetRot() { return new LSL_Types.Quaternion(); }
+        public void llSetRot(LSL_Types.Quaternion rot) 
+        { 
+            m_host.UpdateRotation(new LLQuaternion((float)rot.X, (float)rot.Y, (float)rot.Z, (float)rot.R));
+        }
+        public LSL_Types.Quaternion llGetRot() 
+        { 
+            LLQuaternion q = m_host.RotationOffset;
+            return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 
+        }
         public LSL_Types.Quaternion llGetLocalRot() { return new LSL_Types.Quaternion(); }
         public void llSetForce(LSL_Types.Vector3 force, int local) { }
         public LSL_Types.Vector3 llGetForce() { return new LSL_Types.Vector3(); }
-- 
cgit v1.1