diff options
author | SignpostMarv | 2012-08-01 15:18:02 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-17 23:23:03 +0100 |
commit | 466d684fbe26b4ea24a0003120d7a875fbbca037 (patch) | |
tree | d362efb063f6e8deb9997a52f003605ea9992601 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | attempt to handle InvalidCastException in a manner similar to Second Life (diff) | |
download | opensim-SC_OLD-466d684fbe26b4ea24a0003120d7a875fbbca037.zip opensim-SC_OLD-466d684fbe26b4ea24a0003120d7a875fbbca037.tar.gz opensim-SC_OLD-466d684fbe26b4ea24a0003120d7a875fbbca037.tar.bz2 opensim-SC_OLD-466d684fbe26b4ea24a0003120d7a875fbbca037.tar.xz |
implemented
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 1 |
2 files changed, 14 insertions, 0 deletions
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 | |||
7666 | LSL_Float gain = rules.GetLSLFloatItem(idx++); | 7666 | LSL_Float gain = rules.GetLSLFloatItem(idx++); |
7667 | TargetOmega(part, axis, (double)spinrate, (double)gain); | 7667 | TargetOmega(part, axis, (double)spinrate, (double)gain); |
7668 | break; | 7668 | break; |
7669 | case (int)ScriptBaseClass.PRIM_SLICE: | ||
7670 | if (remain < 1) | ||
7671 | return; | ||
7672 | LSL_Vector slice = rules.GetVector3Item(idx++); | ||
7673 | part.UpdateSlice((float)slice.x, (float)slice.y); | ||
7674 | break; | ||
7669 | case (int)ScriptBaseClass.PRIM_LINK_TARGET: | 7675 | case (int)ScriptBaseClass.PRIM_LINK_TARGET: |
7670 | if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. | 7676 | if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. |
7671 | return null; | 7677 | return null; |
@@ -8340,6 +8346,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8340 | case (int)ScriptBaseClass.PRIM_POS_LOCAL: | 8346 | case (int)ScriptBaseClass.PRIM_POS_LOCAL: |
8341 | res.Add(new LSL_Vector(GetPartLocalPos(part))); | 8347 | res.Add(new LSL_Vector(GetPartLocalPos(part))); |
8342 | break; | 8348 | break; |
8349 | case (int)ScriptBaseClass.PRIM_SLICE: | ||
8350 | res.Add(new LSL_Vector( | ||
8351 | (part.GetPrimType() == PrimType.SPHERE ? part.Shape.ProfileBegin : part.Shape.PathBegin) / 50000.0, | ||
8352 | 1 - (part.GetPrimType() == PrimType.SPHERE ? part.Shape.ProfileEnd : part.Shape.PathEnd) / 50000.0, | ||
8353 | 0 | ||
8354 | )); | ||
8355 | break; | ||
8343 | } | 8356 | } |
8344 | } | 8357 | } |
8345 | return res; | 8358 | 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 | |||
328 | public const int PRIM_OMEGA = 32; | 328 | public const int PRIM_OMEGA = 32; |
329 | public const int PRIM_POS_LOCAL = 33; | 329 | public const int PRIM_POS_LOCAL = 33; |
330 | public const int PRIM_LINK_TARGET = 34; | 330 | public const int PRIM_LINK_TARGET = 34; |
331 | public const int PRIM_SLICE = 35; | ||
331 | public const int PRIM_TEXGEN_DEFAULT = 0; | 332 | public const int PRIM_TEXGEN_DEFAULT = 0; |
332 | public const int PRIM_TEXGEN_PLANAR = 1; | 333 | public const int PRIM_TEXGEN_PLANAR = 1; |
333 | 334 | ||