diff options
-rw-r--r-- | OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs index 95e6c32..a3452ab 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -228,8 +228,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
228 | assetData = new byte[data.Length]; | 228 | assetData = new byte[data.Length]; |
229 | Array.Copy(data, assetData, data.Length); | 229 | Array.Copy(data, assetData, data.Length); |
230 | } | 230 | } |
231 | 231 | ||
232 | //TODO delete the last asset(data), if it was a dynamic texture | 232 | // Create a new asset for user |
233 | AssetBase asset = new AssetBase(); | 233 | AssetBase asset = new AssetBase(); |
234 | asset.FullID = LLUUID.Random(); | 234 | asset.FullID = LLUUID.Random(); |
235 | asset.Data = assetData; | 235 | asset.Data = assetData; |
@@ -244,6 +244,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
244 | 244 | ||
245 | // mostly keep the values from before | 245 | // mostly keep the values from before |
246 | LLObject.TextureEntry tmptex = part.Shape.Textures; | 246 | LLObject.TextureEntry tmptex = part.Shape.Textures; |
247 | |||
248 | // remove the old asset from the cache | ||
249 | LLUUID oldID = tmptex.DefaultTexture.TextureID; | ||
250 | scene.AssetCache.ExpireAsset(oldID); | ||
251 | |||
247 | tmptex.DefaultTexture.TextureID = asset.FullID; | 252 | tmptex.DefaultTexture.TextureID = asset.FullID; |
248 | // I'm pretty sure we always want to force this to true | 253 | // I'm pretty sure we always want to force this to true |
249 | tmptex.DefaultTexture.Fullbright = true; | 254 | tmptex.DefaultTexture.Fullbright = true; |