From 466d684fbe26b4ea24a0003120d7a875fbbca037 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Wed, 1 Aug 2012 15:18:02 +0100 Subject: implemented --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 +++++++++++++ .../Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 1 + 2 files changed, 14 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 255fc8e..75491da 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7666,6 +7666,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_Float gain = rules.GetLSLFloatItem(idx++); TargetOmega(part, axis, (double)spinrate, (double)gain); break; + case (int)ScriptBaseClass.PRIM_SLICE: + if (remain < 1) + return; + LSL_Vector slice = rules.GetVector3Item(idx++); + part.UpdateSlice((float)slice.x, (float)slice.y); + break; case (int)ScriptBaseClass.PRIM_LINK_TARGET: if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. return null; @@ -8340,6 +8346,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_POS_LOCAL: res.Add(new LSL_Vector(GetPartLocalPos(part))); break; + case (int)ScriptBaseClass.PRIM_SLICE: + res.Add(new LSL_Vector( + (part.GetPrimType() == PrimType.SPHERE ? part.Shape.ProfileBegin : part.Shape.PathBegin) / 50000.0, + 1 - (part.GetPrimType() == PrimType.SPHERE ? part.Shape.ProfileEnd : part.Shape.PathEnd) / 50000.0, + 0 + )); + break; } } return res; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index e1c054d..cad8518 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -328,6 +328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_OMEGA = 32; public const int PRIM_POS_LOCAL = 33; public const int PRIM_LINK_TARGET = 34; + public const int PRIM_SLICE = 35; public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_PLANAR = 1; -- cgit v1.1