From 22acc237558b88234dde3fed2bad3e434ec28a62 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 10 Dec 2007 21:38:01 +0000 Subject: 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. --- .../Region/Environment/Scenes/SceneObjectPart.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 8eef40b..3a4129e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -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 -- cgit v1.1