From 60a676251a61c94b1af81859c4895e558bddbc4a Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 16 Aug 2008 21:31:36 +0000 Subject: Mantis#1971. Thank you kindly, BlueWall for a patch that: The included patch enable handling for PRIM_FULLBRIGHT in llSetPrimitiveParams(). --- .../Shared/Api/Implementation/LSL_Api.cs | 42 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (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 410921a..a1d2446 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1088,7 +1088,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } } - + + public void SetFullBright(SceneObjectPart part, int face, bool bright) + { + LLObject.TextureEntry tex = part.Shape.Textures; + if (face > -1) + { + tex.CreateFace((uint) face); + tex.FaceTextures[face].Fullbright = bright; + part.UpdateTexture(tex); + return; + } + else if (face == -1) + { + for (uint i = 0; i < 32; i++) + { + if (tex.FaceTextures[i] != null) + { + tex.FaceTextures[i].Fullbright = bright; + } + } + tex.DefaultTexture.Fullbright = bright; + part.UpdateTexture(tex); + return; + } + } + public double llGetAlpha(int face) { m_host.AddScriptLPS(1); @@ -5498,7 +5523,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api SetShiny(part, face, shiny, bump); break; - } + case (int)ScriptBaseClass.PRIM_FULLBRIGHT: + if (remain < 2) + return; + face = Convert.ToInt32(rules.Data[idx++]); + string bv = rules.Data[idx++].ToString(); + bool st; + if(bv.Equals("1")) + st = true; + else + st = false; + + SetFullBright(part, face , st); + break; + } } } -- cgit v1.1