diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 20 |
1 files changed, 9 insertions, 11 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); |