From 9f8ff36348f3a63addca35b8aa14526517151518 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 15 Aug 2008 16:26:56 +0000 Subject: Mantis #1961 Thank you, BlueWall, for a patch that adds PRIM_GLOW --- .../Shared/Api/Implementation/LSL_Api.cs | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 825379d..09377a1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1013,6 +1013,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } } + + public void SetGlow(SceneObjectPart part, int face, float glow) + { + LLObject.TextureEntry tex = part.Shape.Textures; + if (face > -1) + { + tex.CreateFace((uint) face); + tex.FaceTextures[face].Glow = glow; + part.UpdateTexture(tex); + return; + } + else if (face == -1) + { + for (uint i = 0; i < 32; i++) + { + if (tex.FaceTextures[i] != null) + { + tex.FaceTextures[i].Glow = glow; + } + tex.DefaultTexture.Glow = glow; + } + part.UpdateTexture(tex); + return; + } + } public double llGetAlpha(int face) { @@ -5404,6 +5429,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api SetPointLight(part, (light == 1), lightcolor, intensity, radius, falloff); break; + case (int)ScriptBaseClass.PRIM_GLOW: + if (remain < 2) + return; + face = Convert.ToInt32(rules.Data[idx++]); + float glow = (float)Convert.ToDouble(rules.Data[idx++]); + + SetGlow(part, face, glow); + + break; } } } -- cgit v1.1