From 7068fddd2fffe356869171ed67be473f7a701470 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Thu, 2 Aug 2012 09:28:32 +0100 Subject: fixing bug that get/set the wrong property for prim types other than sphere & box --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 75491da..31d1660 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -8347,9 +8347,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Vector(GetPartLocalPos(part))); break; case (int)ScriptBaseClass.PRIM_SLICE: + PrimType prim_type = part.GetPrimType(); + bool useProfileBeginEnd = (prim_type == PrimType.SPHERE || prim_type == PrimType.TORUS || prim_type == PrimType.TUBE || prim_type == PrimType.RING); 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, + (useProfileBeginEnd ? part.Shape.ProfileBegin : part.Shape.PathBegin) / 50000.0, + 1 - (useProfileBeginEnd ? part.Shape.ProfileEnd : part.Shape.PathEnd) / 50000.0, 0 )); break; -- cgit v1.1