* Insulate maptile volume draw routine against TextureEntry oddities.

0.6.0-stable
Teravus Ovares 2008-06-12 11:06:31 +00:00
parent 2b6487c832
commit 049cfe80e4
1 changed files with 28 additions and 14 deletions

View File

@ -1167,6 +1167,10 @@ namespace OpenSim.Region.Environment.Scenes
{
// Draw if the object is at least 1 meter wide in any direction
if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f)
{
// Try to get the RGBA of the default texture entry..
//
try
{
LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA;
int colorr = 255 - (int)(texcolor.R * 255f);
@ -1177,6 +1181,7 @@ namespace OpenSim.Region.Environment.Scenes
{ }
else
{
//Try to set the map spot color
try
{
// If the color gets goofy somehow, skip it *shakes fist at LLColor
@ -1186,6 +1191,15 @@ namespace OpenSim.Region.Environment.Scenes
{
}
}
}
catch (IndexOutOfRangeException)
{
// Windows Array
}
catch (ArgumentOutOfRangeException)
{
// Mono Array
}
LLVector3 pos = part.GetWorldPosition();