aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '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 }