mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user