diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 8eef40b..3a4129e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1211,6 +1211,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
1211 | ScheduleFullUpdate(); | 1211 | ScheduleFullUpdate(); |
1212 | } | 1212 | } |
1213 | 1213 | ||
1214 | // Added to handle bug in libsecondlife's TextureEntry.ToBytes() | ||
1215 | // not handling RGBA properly. Cycles through, and "fixes" the color | ||
1216 | // info | ||
1217 | public void UpdateTexture(LLObject.TextureEntry tex) | ||
1218 | { | ||
1219 | LLColor tmpcolor; | ||
1220 | for (uint i = 0; i < 32; i++) | ||
1221 | { | ||
1222 | if (tex.FaceTextures[i] != null) | ||
1223 | { | ||
1224 | tmpcolor = tex.GetFace((uint)i).RGBA; | ||
1225 | tmpcolor.A = tmpcolor.A * 255; | ||
1226 | tmpcolor.R = tmpcolor.R * 255; | ||
1227 | tmpcolor.G = tmpcolor.G * 255; | ||
1228 | tmpcolor.B = tmpcolor.B * 255; | ||
1229 | tex.FaceTextures[i].RGBA = tmpcolor; | ||
1230 | } | ||
1231 | } | ||
1232 | tmpcolor = tex.DefaultTexture.RGBA; | ||
1233 | tmpcolor.A = tmpcolor.A * 255; | ||
1234 | tmpcolor.R = tmpcolor.R * 255; | ||
1235 | tmpcolor.G = tmpcolor.G * 255; | ||
1236 | tmpcolor.B = tmpcolor.B * 255; | ||
1237 | tex.DefaultTexture.RGBA = tmpcolor; | ||
1238 | UpdateTextureEntry(tex.ToBytes()); | ||
1239 | } | ||
1240 | |||
1214 | #endregion | 1241 | #endregion |
1215 | 1242 | ||
1216 | #region ParticleSystem | 1243 | #region ParticleSystem |