aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs20
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs7
2 files changed, 12 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 643764f..678e772 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -285,24 +285,22 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
285 return; 285 return;
286 } 286 }
287 287
288 byte[] assetData; 288 byte[] assetData = null;
289 AssetBase oldAsset = null; 289 AssetBase oldAsset = null;
290 290
291 if (BlendWithOldTexture) 291 if (BlendWithOldTexture)
292 { 292 {
293 UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; 293 Primitive.TextureEntryFace defaultFace = part.Shape.Textures.DefaultTexture;
294 oldAsset = scene.AssetService.Get(lastTextureID.ToString()); 294 if (defaultFace != null)
295 if (oldAsset != null)
296 {
297 assetData = BlendTextures(data, oldAsset.Data, SetNewFrontAlpha, FrontAlpha);
298 }
299 else
300 { 295 {
301 assetData = new byte[data.Length]; 296 oldAsset = scene.AssetService.Get(defaultFace.TextureID.ToString());
302 Array.Copy(data, assetData, data.Length); 297
298 if (oldAsset != null)
299 assetData = BlendTextures(data, oldAsset.Data, SetNewFrontAlpha, FrontAlpha);
303 } 300 }
304 } 301 }
305 else 302
303 if (assetData == null)
306 { 304 {
307 assetData = new byte[data.Length]; 305 assetData = new byte[data.Length];
308 Array.Copy(data, assetData, data.Length); 306 Array.Copy(data, assetData, data.Length);
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
index 285d36a..b71b5f6 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
@@ -251,13 +251,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
251 // if you want tree blocks on the map comment the above line and uncomment the below line 251 // if you want tree blocks on the map comment the above line and uncomment the below line
252 //mapdotspot = Color.PaleGreen; 252 //mapdotspot = Color.PaleGreen;
253 253
254 if (part.Shape.Textures == null) 254 Primitive.TextureEntry textureEntry = part.Shape.Textures;
255 continue;
256 255
257 if (part.Shape.Textures.DefaultTexture == null) 256 if (textureEntry == null || textureEntry.DefaultTexture == null)
258 continue; 257 continue;
259 258
260 Color4 texcolor = part.Shape.Textures.DefaultTexture.RGBA; 259 Color4 texcolor = textureEntry.DefaultTexture.RGBA;
261 260
262 // Not sure why some of these are null, oh well. 261 // Not sure why some of these are null, oh well.
263 262