diff options
author | Teravus Ovares | 2008-06-12 11:06:31 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-12 11:06:31 +0000 |
commit | 049cfe80e4d8e0a030346f7ad9ad280b7afa4718 (patch) | |
tree | 604be9fca8a3445aa3377bcfb3ead6d3352f43b4 /OpenSim/Region | |
parent | * Added Prim drawing to the mainmap tile generation.. you can see blocks re... (diff) | |
download | opensim-SC-049cfe80e4d8e0a030346f7ad9ad280b7afa4718.zip opensim-SC-049cfe80e4d8e0a030346f7ad9ad280b7afa4718.tar.gz opensim-SC-049cfe80e4d8e0a030346f7ad9ad280b7afa4718.tar.bz2 opensim-SC-049cfe80e4d8e0a030346f7ad9ad280b7afa4718.tar.xz |
* Insulate maptile volume draw routine against TextureEntry oddities.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 798c9ad..526c125 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1168,24 +1168,38 @@ namespace OpenSim.Region.Environment.Scenes | |||
1168 | // Draw if the object is at least 1 meter wide in any direction | 1168 | // Draw if the object is at least 1 meter wide in any direction |
1169 | if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f) | 1169 | if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f) |
1170 | { | 1170 | { |
1171 | LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; | 1171 | // Try to get the RGBA of the default texture entry.. |
1172 | int colorr = 255 - (int)(texcolor.R * 255f); | 1172 | // |
1173 | int colorg = 255 - (int)(texcolor.G * 255f); | 1173 | try |
1174 | int colorb = 255 - (int)(texcolor.B * 255f); | ||
1175 | |||
1176 | if (colorr == 255 && colorg == 255 && colorb == 255) | ||
1177 | { } | ||
1178 | else | ||
1179 | { | 1174 | { |
1180 | try | 1175 | LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; |
1181 | { | 1176 | int colorr = 255 - (int)(texcolor.R * 255f); |
1182 | // If the color gets goofy somehow, skip it *shakes fist at LLColor | 1177 | int colorg = 255 - (int)(texcolor.G * 255f); |
1183 | mapdotspot = Color.FromArgb(colorr, colorg, colorb); | 1178 | int colorb = 255 - (int)(texcolor.B * 255f); |
1184 | } | 1179 | |
1185 | catch (ArgumentException) | 1180 | if (colorr == 255 && colorg == 255 && colorb == 255) |
1181 | { } | ||
1182 | else | ||
1186 | { | 1183 | { |
1184 | //Try to set the map spot color | ||
1185 | try | ||
1186 | { | ||
1187 | // If the color gets goofy somehow, skip it *shakes fist at LLColor | ||
1188 | mapdotspot = Color.FromArgb(colorr, colorg, colorb); | ||
1189 | } | ||
1190 | catch (ArgumentException) | ||
1191 | { | ||
1192 | } | ||
1187 | } | 1193 | } |
1188 | } | 1194 | } |
1195 | catch (IndexOutOfRangeException) | ||
1196 | { | ||
1197 | // Windows Array | ||
1198 | } | ||
1199 | catch (ArgumentOutOfRangeException) | ||
1200 | { | ||
1201 | // Mono Array | ||
1202 | } | ||
1189 | 1203 | ||
1190 | LLVector3 pos = part.GetWorldPosition(); | 1204 | LLVector3 pos = part.GetWorldPosition(); |
1191 | 1205 | ||