Thank you, BlueWall, for a patch that adds PRIM_GLOW
0.6.0-stable
Melanie Thielker 2008-08-15 16:26:56 +00:00
parent 3e7e0c8ced
commit 9f8ff36348
1 changed files with 34 additions and 0 deletions

View File

@ -1014,6 +1014,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
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)
{
m_host.AddScriptLPS(1);
@ -5403,6 +5428,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;
}
}