Fixing a bug in DNE which caused the face-colors to be inverted when set via script.

0.6.0-stable
Homer Horwitz 2008-09-13 21:54:07 +00:00
parent 6e6465f6c1
commit 54e1988d85
1 changed files with 9 additions and 9 deletions

View File

@ -1181,9 +1181,9 @@ namespace OpenSim.Region.ScriptEngine.Common
if (face > -1) if (face > -1)
{ {
texcolor = tex.CreateFace((uint)face).RGBA; texcolor = tex.CreateFace((uint)face).RGBA;
texcolor.R = (float)Math.Abs(color.x - 1); texcolor.R = (float)color.x;
texcolor.G = (float)Math.Abs(color.y - 1); texcolor.G = (float)color.y;
texcolor.B = (float)Math.Abs(color.z - 1); texcolor.B = (float)color.z;
tex.FaceTextures[face].RGBA = texcolor; tex.FaceTextures[face].RGBA = texcolor;
part.UpdateTexture(tex); part.UpdateTexture(tex);
return; return;
@ -1195,15 +1195,15 @@ namespace OpenSim.Region.ScriptEngine.Common
if (tex.FaceTextures[i] != null) if (tex.FaceTextures[i] != null)
{ {
texcolor = tex.FaceTextures[i].RGBA; texcolor = tex.FaceTextures[i].RGBA;
texcolor.R = (float)Math.Abs(color.x - 1); texcolor.R = (float)color.x;
texcolor.G = (float)Math.Abs(color.y - 1); texcolor.G = (float)color.y;
texcolor.B = (float)Math.Abs(color.z - 1); texcolor.B = (float)color.z;
tex.FaceTextures[i].RGBA = texcolor; tex.FaceTextures[i].RGBA = texcolor;
} }
texcolor = tex.DefaultTexture.RGBA; texcolor = tex.DefaultTexture.RGBA;
texcolor.R = (float)Math.Abs(color.x - 1); texcolor.R = (float)color.x;
texcolor.G = (float)Math.Abs(color.y - 1); texcolor.G = (float)color.y;
texcolor.B = (float)Math.Abs(color.z - 1); texcolor.B = (float)color.z;
tex.DefaultTexture.RGBA = texcolor; tex.DefaultTexture.RGBA = texcolor;
} }
part.UpdateTexture(tex); part.UpdateTexture(tex);