From 212e132e79f868fd3bb9bcf9ef2c13eb12f8c14e Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 2 Oct 2009 00:47:01 +0100 Subject: Revert "* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityBase.Rotation * Removed SceneObjectGroup.GroupRotation and added overrides for Scale/Rotation/Velocity" This reverts commit 39842eb4af3b5a8c52d56c0f7f05ad54f0651bb0. --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 ++++---- OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 12 +++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3051609..11ae661 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2013,10 +2013,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api q = avatar.Rotation; // Currently infrequently updated so may be inaccurate } else - q = part.ParentGroup.Rotation; // Likely never get here but just in case + q = part.ParentGroup.GroupRotation; // Likely never get here but just in case } else - q = part.ParentGroup.Rotation; // just the group rotation + q = part.ParentGroup.GroupRotation; // just the group rotation return new LSL_Rotation(q.X, q.Y, q.Z, q.W); } q = part.GetWorldRotation(); @@ -7184,10 +7184,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else q = avatar.Rotation; // Currently infrequently updated so may be inaccurate else - q = m_host.ParentGroup.Rotation; // Likely never get here but just in case + q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case } else - q = m_host.ParentGroup.Rotation; // just the group rotation + q = m_host.ParentGroup.GroupRotation; // just the group rotation return new LSL_Rotation(q.X, q.Y, q.Z, q.W); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 84ccafe..4855d64 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs @@ -218,14 +218,16 @@ namespace OpenSim.Region.ScriptEngine.Shared } } - Vector3 absPos = part.AbsolutePosition; - Position = new LSL_Types.Vector3(absPos.X, absPos.Y, absPos.Z); + Position = new LSL_Types.Vector3(part.AbsolutePosition.X, + part.AbsolutePosition.Y, + part.AbsolutePosition.Z); - Quaternion wr = part.ParentGroup.Rotation; + Quaternion wr = part.ParentGroup.GroupRotation; Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); - Vector3 vel = part.Velocity; - Velocity = new LSL_Types.Vector3(vel.X, vel.Y, vel.Z); + Velocity = new LSL_Types.Vector3(part.Velocity.X, + part.Velocity.Y, + part.Velocity.Z); } } -- cgit v1.1