Great Salutations to Alondria for providing implementations for:

llFrand, llSetColor, llGetColor, llSetTexture, llGetTexture,
llSetAlpha, llGetAlpha, llRotateTexture, llScaleTexture,
llOffsetTexture, llGetTextureOffset, llGetTextureScale, llGetTextureRot.
With these changes the "kan-ed" script #2 should be working.
This commit is contained in:
Charles Krinke
2007-12-10 21:38:01 +00:00
parent 2349dc2e27
commit 22acc23755
2 changed files with 271 additions and 27 deletions

View File

@@ -1211,6 +1211,33 @@ namespace OpenSim.Region.Environment.Scenes
ScheduleFullUpdate();
}
// Added to handle bug in libsecondlife's TextureEntry.ToBytes()
// not handling RGBA properly. Cycles through, and "fixes" the color
// info
public void UpdateTexture(LLObject.TextureEntry tex)
{
LLColor tmpcolor;
for (uint i = 0; i < 32; i++)
{
if (tex.FaceTextures[i] != null)
{
tmpcolor = tex.GetFace((uint)i).RGBA;
tmpcolor.A = tmpcolor.A * 255;
tmpcolor.R = tmpcolor.R * 255;
tmpcolor.G = tmpcolor.G * 255;
tmpcolor.B = tmpcolor.B * 255;
tex.FaceTextures[i].RGBA = tmpcolor;
}
}
tmpcolor = tex.DefaultTexture.RGBA;
tmpcolor.A = tmpcolor.A * 255;
tmpcolor.R = tmpcolor.R * 255;
tmpcolor.G = tmpcolor.G * 255;
tmpcolor.B = tmpcolor.B * 255;
tex.DefaultTexture.RGBA = tmpcolor;
UpdateTextureEntry(tex.ToBytes());
}
#endregion
#region ParticleSystem