aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/DynamicTexture
diff options
context:
space:
mode:
authorJohn Hurliman2010-03-16 11:50:22 -0700
committerJohn Hurliman2010-03-16 11:50:22 -0700
commitb4dcdffb5094c488a98acbe675b333c3bd4cc570 (patch)
tree14998b10e4d13d2dd933a5d5e014db1f4bb07b43 /OpenSim/Region/CoreModules/Scripting/DynamicTexture
parent* Fixing the SimianGrid friend connector enabled detection since the friends ... (diff)
downloadopensim-SC-b4dcdffb5094c488a98acbe675b333c3bd4cc570.zip
opensim-SC-b4dcdffb5094c488a98acbe675b333c3bd4cc570.tar.gz
opensim-SC-b4dcdffb5094c488a98acbe675b333c3bd4cc570.tar.bz2
opensim-SC-b4dcdffb5094c488a98acbe675b333c3bd4cc570.tar.xz
Fixed several unhandled exceptions and performance issues with PrimitiveBaseShape.Textures. This really should be moved from a property to a method if it is going to decode a byte[] into a TextureEntry each time
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/DynamicTexture')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs20
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);