From 709814c19438e279d58a9689b0b3a6f2b1989e34 Mon Sep 17 00:00:00 2001 From: dahlia Date: Tue, 5 Nov 2013 23:38:43 -0800 Subject: add support for particle blending LSL functions --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e6ff75f..86e8200 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6270,6 +6270,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ps.BurstRate = 0.1f; ps.PartMaxAge = 10.0f; ps.BurstPartCount = 1; + ps.BlendFuncSource = ScriptBaseClass.PSYS_PART_BF_SOURCE_ALPHA; + ps.BlendFuncDest = ScriptBaseClass.PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA; + return ps; } @@ -6304,6 +6307,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_Vector tempv = new LSL_Vector(); float tempf = 0; + int tmpi = 0; for (int i = 0; i < rules.Length; i += 2) { @@ -6362,7 +6366,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.PSYS_SRC_PATTERN: - int tmpi = (int)rules.GetLSLIntegerItem(i + 1); + tmpi = (int)rules.GetLSLIntegerItem(i + 1); prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi; break; @@ -6382,6 +6386,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off. break; + case (int)ScriptBaseClass.PSYS_PART_BLEND_FUNC_SOURCE: + tmpi = (int)rules.GetLSLIntegerItem(i + 1); + prules.BlendFuncSource = (byte)tmpi; + break; + + case (int)ScriptBaseClass.PSYS_PART_BLEND_FUNC_DEST: + tmpi = (int)rules.GetLSLIntegerItem(i + 1); + prules.BlendFuncDest = (byte)tmpi; + break; + case (int)ScriptBaseClass.PSYS_SRC_TEXTURE: prules.Texture = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, rules.GetLSLStringItem(i + 1)); break; -- cgit v1.1