aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Scripting
diff options
context:
space:
mode:
authorSean Dague2008-06-30 18:27:01 +0000
committerSean Dague2008-06-30 18:27:01 +0000
commit32ca6b6035a1392477d3d36d6450de9d5191ba42 (patch)
treeedbcedc5125cf46606e99105a111814c8e02d51b /OpenSim/Region/Environment/Modules/Scripting
parentadd the ability to cherry pick expire something from the asset (diff)
downloadopensim-SC_OLD-32ca6b6035a1392477d3d36d6450de9d5191ba42.zip
opensim-SC_OLD-32ca6b6035a1392477d3d36d6450de9d5191ba42.tar.gz
opensim-SC_OLD-32ca6b6035a1392477d3d36d6450de9d5191ba42.tar.bz2
opensim-SC_OLD-32ca6b6035a1392477d3d36d6450de9d5191ba42.tar.xz
attempt to expire out old dynamic textures, so they don't grow forever.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Scripting')
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs9
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;