aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-23 21:21:02 +0100
committerJustin Clark-Casey (justincc)2011-08-23 21:21:02 +0100
commit4a101080ee5ec19de958586991e4403741d51267 (patch)
treef9aeb712b7e5442321f98f553530fdfa91fe523b
parentreplace old TestAddAttachments() with a more thorough TestAddAttachment() (diff)
parentProtect a check for default texture entry when setting alpha values. Apparently (diff)
downloadopensim-SC_OLD-4a101080ee5ec19de958586991e4403741d51267.zip
opensim-SC_OLD-4a101080ee5ec19de958586991e4403741d51267.tar.gz
opensim-SC_OLD-4a101080ee5ec19de958586991e4403741d51267.tar.bz2
opensim-SC_OLD-4a101080ee5ec19de958586991e4403741d51267.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ef67a0c..24be7d4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1619,9 +1619,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1619 tex.FaceTextures[i].RGBA = texcolor; 1619 tex.FaceTextures[i].RGBA = texcolor;
1620 } 1620 }
1621 } 1621 }
1622 texcolor = tex.DefaultTexture.RGBA; 1622
1623 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); 1623 // In some cases, the default texture can be null, eg when every face
1624 tex.DefaultTexture.RGBA = texcolor; 1624 // has a unique texture
1625 if (tex.DefaultTexture != null)
1626 {
1627 texcolor = tex.DefaultTexture.RGBA;
1628 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
1629 tex.DefaultTexture.RGBA = texcolor;
1630 }
1631
1625 part.UpdateTexture(tex); 1632 part.UpdateTexture(tex);
1626 return; 1633 return;
1627 } 1634 }