From 052e4a060ceed35eeda623cee9a9826cc1e7b8f8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 3 Dec 2019 14:27:31 +0000 Subject: mantis 8632: stop trigering Changed on just scale checks --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1591cb1..8815a28 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -8912,6 +8912,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api elemLength = 3; List keyframes = new List(); + bool hasTranslation = (data & KeyframeMotion.DataFormat.Translation) != 0; + bool hasRotation = (data & KeyframeMotion.DataFormat.Rotation) != 0; while (idx < frames.Data.Length) { int remain = frames.Data.Length - idx; @@ -8923,16 +8925,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api frame.Position = null; frame.Rotation = null; - if ((data & KeyframeMotion.DataFormat.Translation) != 0) + if (hasTranslation) { LSL_Types.Vector3 tempv = frames.GetVector3Item(idx++); frame.Position = new Vector3((float)tempv.x, (float)tempv.y, (float)tempv.z); } - if ((data & KeyframeMotion.DataFormat.Rotation) != 0) + if (hasRotation) { LSL_Types.Quaternion tempq = frames.GetQuaternionItem(idx++); Quaternion q = new Quaternion((float)tempq.x, (float)tempq.y, (float)tempq.z, (float)tempq.s); - q.Normalize(); frame.Rotation = q; } -- cgit v1.1