aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/DynamicTextureModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index 51a5534..bac0d59 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -96,9 +96,10 @@ namespace OpenSim.Region.Environment.Modules
96 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, 96 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url,
97 string extraParams, int updateTimer) 97 string extraParams, int updateTimer)
98 { 98 {
99 Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType);
100 if (RenderPlugins.ContainsKey(contentType)) 99 if (RenderPlugins.ContainsKey(contentType))
101 { 100 {
101 //Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType);
102
102 DynamicTextureUpdater updater = new DynamicTextureUpdater(); 103 DynamicTextureUpdater updater = new DynamicTextureUpdater();
103 updater.SimUUID = simID; 104 updater.SimUUID = simID;
104 updater.PrimID = primID; 105 updater.PrimID = primID;
@@ -166,12 +167,16 @@ namespace OpenSim.Region.Environment.Modules
166 public void DataReceived(byte[] data, Scene scene) 167 public void DataReceived(byte[] data, Scene scene)
167 { 168 {
168 //TODO delete the last asset(data), if it was a dynamic texture 169 //TODO delete the last asset(data), if it was a dynamic texture
169 170 byte[] assetData = new byte[data.Length];
171 Array.Copy(data, assetData, data.Length);
170 AssetBase asset = new AssetBase(); 172 AssetBase asset = new AssetBase();
171 asset.FullID = LLUUID.Random(); 173 asset.FullID = LLUUID.Random();
172 asset.Data = data; 174 asset.Data = assetData;
173 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); 175 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000);
174 asset.Type = 0; 176 asset.Type = 0;
177 asset.Description = "dynamic image";
178 asset.Local = false;
179 asset.Temporary = false;
175 scene.commsManager.AssetCache.AddAsset(asset); 180 scene.commsManager.AssetCache.AddAsset(asset);
176 181
177 LastAssetID = asset.FullID; 182 LastAssetID = asset.FullID;