* Insulate maptile volume draw routine against TextureEntry oddities.
parent
2b6487c832
commit
049cfe80e4
|
@ -1168,24 +1168,38 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// Draw if the object is at least 1 meter wide in any direction
|
// 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)
|
if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f)
|
||||||
{
|
{
|
||||||
LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA;
|
// Try to get the RGBA of the default texture entry..
|
||||||
int colorr = 255 - (int)(texcolor.R * 255f);
|
//
|
||||||
int colorg = 255 - (int)(texcolor.G * 255f);
|
try
|
||||||
int colorb = 255 - (int)(texcolor.B * 255f);
|
|
||||||
|
|
||||||
if (colorr == 255 && colorg == 255 && colorb == 255)
|
|
||||||
{ }
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
try
|
LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA;
|
||||||
{
|
int colorr = 255 - (int)(texcolor.R * 255f);
|
||||||
// If the color gets goofy somehow, skip it *shakes fist at LLColor
|
int colorg = 255 - (int)(texcolor.G * 255f);
|
||||||
mapdotspot = Color.FromArgb(colorr, colorg, colorb);
|
int colorb = 255 - (int)(texcolor.B * 255f);
|
||||||
}
|
|
||||||
catch (ArgumentException)
|
if (colorr == 255 && colorg == 255 && colorb == 255)
|
||||||
|
{ }
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
//Try to set the map spot color
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// If the color gets goofy somehow, skip it *shakes fist at LLColor
|
||||||
|
mapdotspot = Color.FromArgb(colorr, colorg, colorb);
|
||||||
|
}
|
||||||
|
catch (ArgumentException)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (IndexOutOfRangeException)
|
||||||
|
{
|
||||||
|
// Windows Array
|
||||||
|
}
|
||||||
|
catch (ArgumentOutOfRangeException)
|
||||||
|
{
|
||||||
|
// Mono Array
|
||||||
|
}
|
||||||
|
|
||||||
LLVector3 pos = part.GetWorldPosition();
|
LLVector3 pos = part.GetWorldPosition();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue