From bc4e5d81b9d9943595891b04b3a1198cc7c7a345 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 26 Jun 2016 14:40:26 +0100 Subject: add PRIM_OMEGA to llGet(LINK)PrimitiveParams. This will not return same values as spec, because the way our targetomega works. ( only did minor testing) --- .../Shared/Api/Implementation/LSL_Api.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fac361f..32b3bb7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -11132,6 +11132,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api 0 )); break; + + case (int)ScriptBaseClass.PRIM_OMEGA: + // this may return values diferent from SL since we don't handle set the same way + float gain = 1.0f; // we don't use gain and don't store it + Vector3 axis = part.AngularVelocity; + float spin = axis.Length(); + if(spin < 1.0e-6) + { + axis = Vector3.Zero; + gain = 0.0f; + spin = 0.0f; + } + else + { + axis = axis * (1.0f/spin); + } + + res.Add(new LSL_Vector(axis.X, + axis.Y, + axis.Z)); + res.Add(new LSL_Float(spin)); + res.Add(new LSL_Float(gain)); + break; + case (int)ScriptBaseClass.PRIM_LINK_TARGET: // TODO: Should be issuing a runtime script warning in this case. -- cgit v1.1