From 93837807ffb24e5811368063b9231a9d8b018d9d Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 16 Feb 2009 19:15:16 +0000
Subject: * refactor: remove AssetCache field hanging off Scene * This is
 always available at Scene.CommsManager.AssetCache

---
 OpenSim/Region/Application/HGOpenSimNode.cs          |  2 +-
 OpenSim/Region/Application/OpenSimBase.cs            |  2 +-
 .../Agent/Capabilities/CapabilitiesModule.cs         |  2 +-
 .../TextureDownload/UserTextureDownloadService.cs    |  2 +-
 .../Hypergrid/HGStandaloneAssetService.cs            |  3 ++-
 .../Scripting/DynamicTexture/DynamicTextureModule.cs |  6 +++---
 .../CoreModules/World/Archiver/ArchiveReadRequest.cs |  2 +-
 .../World/Archiver/ArchiveWriteRequestPreparation.cs |  4 ++--
 .../World/WorldMap/TexturedMapTileRenderer.cs        |  2 +-
 .../CoreModules/World/WorldMap/WorldMapModule.cs     |  2 +-
 .../Framework/Scenes/Hypergrid/HGAssetMapper.cs      |  2 +-
 .../Framework/Scenes/Hypergrid/HGScene.Inventory.cs  |  4 ++--
 OpenSim/Region/Framework/Scenes/Scene.Inventory.cs   | 20 ++++++++++----------
 OpenSim/Region/Framework/Scenes/Scene.cs             |  5 ++---
 OpenSim/Region/Framework/Scenes/SceneBase.cs         |  8 --------
 OpenSim/Region/Framework/Scenes/SceneManager.cs      |  2 +-
 OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs  |  3 ++-
 OpenSim/Region/Framework/Scenes/SceneObjectPart.cs   |  8 +++++---
 .../Framework/Scenes/SceneObjectPartInventory.cs     |  2 +-
 .../Shared/Api/Implementation/LSL_Api.cs             |  4 ++--
 .../Shared/Api/Implementation/OSSL_Api.cs            |  2 +-
 21 files changed, 41 insertions(+), 46 deletions(-)

(limited to 'OpenSim/Region')

diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs
index 8778acd..cf0f917 100644
--- a/OpenSim/Region/Application/HGOpenSimNode.cs
+++ b/OpenSim/Region/Application/HGOpenSimNode.cs
@@ -130,7 +130,7 @@ namespace OpenSim
             
             return
                 new HGScene(
-                    regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager,
+                    regionInfo, circuitManager, m_commsManager, sceneGridService, storageManager,
                     m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim, 
                     m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
         }
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 8198138..add7cb9 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -663,7 +663,7 @@ namespace OpenSim
             SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
             
             return new Scene(
-                regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache,
+                regionInfo, circuitManager, m_commsManager, sceneGridService,
                 storageManager, m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim, 
                 m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
         }
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index 6327466..2c6b51d 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
 
             Caps caps
                 = new Caps(
-                    m_scene.AssetCache, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, 
+                    m_scene.CommsManager.AssetCache, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, 
                     m_scene.CommsManager.HttpServer.Port,
                     capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName);
             
diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
index 2f98bab..ae71fda 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -152,7 +152,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
                         TextureSender.TextureSender requestHandler = new TextureSender.TextureSender(m_client, e.DiscardLevel, e.PacketNumber);
                         m_textureSenders.Add(e.RequestedAssetID, requestHandler);
 
-                        m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
+                        m_scene.CommsManager.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
                     }
                 }
             }
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs
index c70f65c..7caa786 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneAssetService.cs
@@ -114,7 +114,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid
 
         protected void AddHttpHandlers(Scene m_scene)
         {
-            IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin;
+            IAssetDataPlugin m_assetProvider 
+                = ((AssetServerBase)m_scene.CommsManager.AssetCache.AssetServer).AssetProviderPlugin;
 
             BaseHttpServer httpServer = m_scene.CommsManager.HttpServer;
             httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider));
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 121dc3c..d6f0713 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
                 if (BlendWithOldTexture)
                 {
                     UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID;
-                    oldAsset = scene.AssetCache.GetAsset(lastTextureID, true);
+                    oldAsset = scene.CommsManager.AssetCache.GetAsset(lastTextureID, true);
                     if (oldAsset != null)
                     {
                         assetData = BlendTextures(data, oldAsset.Data, SetNewFrontAlpha, FrontAlpha);
@@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
                 asset.Metadata.Description = "dynamic image";
                 asset.Metadata.Local = false;
                 asset.Metadata.Temporary = true;
-                scene.AssetCache.AddAsset(asset);
+                scene.CommsManager.AssetCache.AddAsset(asset);
 
                 LastAssetID = asset.Metadata.FullID;
 
@@ -254,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
 
                 // remove the old asset from the cache
                 UUID oldID = tmptex.DefaultTexture.TextureID;
-                scene.AssetCache.ExpireAsset(oldID);
+                scene.CommsManager.AssetCache.ExpireAsset(oldID);
 
                 tmptex.DefaultTexture.TextureID = asset.Metadata.FullID;
                 // I'm pretty sure we always want to force this to true
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 9497869..66fc43b 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
                 asset.Metadata.Type = assetType;
                 asset.Data = data;
 
-                m_scene.AssetCache.AddAsset(asset);
+                m_scene.CommsManager.AssetCache.AddAsset(asset);
 
                 /**
                  * Create layers on decode for image assets.  This is likely to significantly increase the time to load archives so
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
index bd36779..139dff0 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
         protected AssetBase GetAsset(UUID uuid)
         {
             m_waitingForObjectAsset = true;
-            m_scene.AssetCache.GetAsset(uuid, AssetRequestCallback, true);
+            m_scene.CommsManager.AssetCache.GetAsset(uuid, AssetRequestCallback, true);
 
             // The asset cache callback can either
             //
@@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
                     m_scene,
                     m_saveStream);
             
-            new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute();
+            new AssetsRequest(assetUuids.Keys, m_scene.CommsManager.AssetCache, awre.ReceivedAllAssets).Execute();
         }
     }
 }
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
index 2e018d3..69d3dac 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
         //   will wait anyway)
         private Bitmap fetchTexture(UUID id)
         {
-            AssetBase asset = m_scene.AssetCache.GetAsset(id, true);
+            AssetBase asset = m_scene.CommsManager.AssetCache.GetAsset(id, true);
             m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null);
             if (asset == null) return null;
 
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 9355374..e1c3d85 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -738,7 +738,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
                     imgstream = new MemoryStream();
 
                     // non-async because we know we have the asset immediately.
-                    AssetBase mapasset = m_scene.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true);
+                    AssetBase mapasset = m_scene.CommsManager.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true);
 
                     // Decode image to System.Drawing.Image
                     if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image))
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
index 4039288..1f01fa2 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
                     {
                         AssetBase asset1 = new AssetBase();
                         Copy(asset, asset1);
-                        m_scene.AssetCache.AssetServer.StoreAsset(asset1);
+                        m_scene.CommsManager.AssetCache.AssetServer.StoreAsset(asset1);
                     }
                     return true;
                 }
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs
index ea03cf9..423acc1 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs
@@ -49,10 +49,10 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
 
         public HGScene(RegionInfo regInfo, AgentCircuitManager authen,
                        CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
-                       IAssetCache assetCach, StorageManager storeManager,
+                       StorageManager storeManager,
                        ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
                        bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
-            : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,
+            : base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader,
                    dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
         {
             m_log.Info("[HGScene]: Starting HGScene.");
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 0c6ad0d..c98629b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Framework.Scenes
 
                         AssetBase asset =
                             CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data);
-                        AssetCache.AddAsset(asset);
+                        CommsManager.AssetCache.AddAsset(asset);
 
                         item.AssetID = asset.Metadata.FullID;
                         userInfo.UpdateItem(item);
@@ -277,7 +277,7 @@ namespace OpenSim.Region.Framework.Scenes
             }
 
             AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data);
-            AssetCache.AddAsset(asset);
+            CommsManager.AssetCache.AddAsset(asset);
 
             if (isScriptRunning)
             {
@@ -681,7 +681,7 @@ namespace OpenSim.Region.Framework.Scenes
             }
 
             AssetBase asset
-                = AssetCache.GetAsset(
+                = CommsManager.AssetCache.GetAsset(
                     item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false));
 
             if (asset != null)
@@ -903,7 +903,7 @@ namespace OpenSim.Region.Framework.Scenes
                     }
 
                     AssetBase asset = CreateAsset(name, description, assetType, data);
-                    AssetCache.AddAsset(asset);
+                    CommsManager.AssetCache.AddAsset(asset);
 
                     CreateNewInventoryItem(remoteClient, folderID, asset.Metadata.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
                 }
@@ -1530,7 +1530,7 @@ namespace OpenSim.Region.Framework.Scenes
                     return;
 
                 AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n    state_entry()\n    {\n        llSay(0, \"Script running\");\n    }\n}"));
-                AssetCache.AddAsset(asset);
+                CommsManager.AssetCache.AddAsset(asset);
 
                 TaskInventoryItem taskItem = new TaskInventoryItem();
 
@@ -1952,7 +1952,7 @@ namespace OpenSim.Region.Framework.Scenes
                 objectGroup.GetPartDescription(objectGroup.RootPart.LocalId),
                 (sbyte)AssetType.Object,
                 Utils.StringToBytes(sceneObjectXml));
-            AssetCache.AddAsset(asset);
+            CommsManager.AssetCache.AddAsset(asset);
             assetID = asset.Metadata.FullID;
 
             if (DeRezAction.SaveToExistingUserInventoryItem == action)
@@ -2078,7 +2078,7 @@ namespace OpenSim.Region.Framework.Scenes
                             objectGroup.GetPartDescription(objectGroup.LocalId),
                             (sbyte)AssetType.Object,
                             Utils.StringToBytes(sceneObjectXml));
-                        AssetCache.AddAsset(asset);
+                        CommsManager.AssetCache.AddAsset(asset);
 
                         item.AssetID = asset.Metadata.FullID;
                         item.Description = asset.Metadata.Description;
@@ -2115,7 +2115,7 @@ namespace OpenSim.Region.Framework.Scenes
                         grp.GetPartDescription(grp.LocalId),
                         (sbyte)AssetType.Object,
                         Utils.StringToBytes(sceneObjectXml));
-                    AssetCache.AddAsset(asset);
+                    CommsManager.AssetCache.AddAsset(asset);
 
                     InventoryItemBase item = new InventoryItemBase();
                     item.Creator = grp.RootPart.CreatorID;
@@ -2239,7 +2239,7 @@ namespace OpenSim.Region.Framework.Scenes
 
                     if (item != null)
                     {
-                        AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false);
+                        AssetBase rezAsset = CommsManager.AssetCache.GetAsset(item.AssetID, false);
 
                         if (rezAsset != null)
                         {
@@ -2407,7 +2407,7 @@ namespace OpenSim.Region.Framework.Scenes
             {
                 UUID ownerID = item.OwnerID;
 
-                AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false);
+                AssetBase rezAsset = CommsManager.AssetCache.GetAsset(item.AssetID, false);
 
                 if (rezAsset != null)
                 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0f57b7c..c3ab5e9 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -268,7 +268,7 @@ namespace OpenSim.Region.Framework.Scenes
 
         public Scene(RegionInfo regInfo, AgentCircuitManager authen,
                      CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
-                     IAssetCache assetCach, StorageManager storeManager,
+                     StorageManager storeManager,
                      ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
                      bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
         {
@@ -281,7 +281,6 @@ namespace OpenSim.Region.Framework.Scenes
             CommsManager = commsMan;
             m_sceneGridService = sceneGridService;
             m_storageManager = storeManager;
-            AssetCache = assetCach;
             m_regInfo = regInfo;
             m_regionHandle = m_regInfo.RegionHandle;
             m_regionName = m_regInfo.RegionName;
@@ -3543,7 +3542,7 @@ namespace OpenSim.Region.Framework.Scenes
                         group.GetPartDescription(localID),
                         (sbyte)AssetType.Object,
                         Utils.StringToBytes(sceneObjectXml));
-                    AssetCache.AddAsset(asset);
+                    CommsManager.AssetCache.AddAsset(asset);
 
                     InventoryItemBase item = new InventoryItemBase();
                     item.Creator = part.CreatorID;
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 3f5c781..3695b21 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -126,14 +126,6 @@ namespace OpenSim.Region.Framework.Scenes
 
         protected string m_datastore;
 
-        private IAssetCache m_assetCache;
-
-        public IAssetCache AssetCache
-        {
-            get { return m_assetCache; }
-            set { m_assetCache = value; }
-        }
-
         protected RegionStatus m_regStatus;
 
         public RegionStatus Region_Status
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index fe37dae..00b49a1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -642,7 +642,7 @@ namespace OpenSim.Region.Framework.Scenes
         {
             for (int i=0;i<arrassets.Length;i++)
             {
-                AssetBase ab = sn.AssetCache.GetAsset(arrassets[i], true);
+                AssetBase ab = sn.CommsManager.AssetCache.GetAsset(arrassets[i], true);
                 if (ab != null && ab.Data != null)
                 {
                     j2kdecode.syncdecode(arrassets[i], ab.Data);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 4b165ce..1b7ae16 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2983,7 +2983,8 @@ namespace OpenSim.Region.Framework.Scenes
                         {
                             if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero)
                             {
-                                m_scene.AssetCache.GetAsset(part.Shape.SculptTexture, part.SculptTextureCallback, true);
+                                m_scene.CommsManager.AssetCache.GetAsset(
+                                    part.Shape.SculptTexture, part.SculptTextureCallback, true);
                             }
                         }
                     }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index dfa9318..ec3fdf1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1422,8 +1422,10 @@ if (m_shape != null) {
             {
                 if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero)
                 {
-                    m_parentGroup.Scene.AssetCache.GetAsset(dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true);
+                    m_parentGroup.Scene.CommsManager.AssetCache.GetAsset(
+                        dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true);
                 }
+                
                 bool UsePhysics = ((dupe.ObjectFlags & (uint)PrimFlags.Physics) != 0);
                 dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
             }
@@ -3232,8 +3234,8 @@ if (m_shape != null) {
             {
                 if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero)
                 {
-                    //AssetBase tx = m_parentGroup.Scene.getase
-                    m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true);
+                    m_parentGroup.Scene.CommsManager.AssetCache.GetAsset(
+                        m_shape.SculptTexture, SculptTextureCallback, true);
                 }
             }
 
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index c15ac47..c625a72 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -251,7 +251,7 @@ namespace OpenSim.Region.Framework.Scenes
                     m_part.ScheduleFullUpdate();
                     return;
                 }
-                IAssetCache cache = m_part.ParentGroup.Scene.AssetCache;
+                IAssetCache cache = m_part.ParentGroup.Scene.CommsManager.AssetCache;
 
                 cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset)
                                {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 9f5d143..e5f097f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3549,7 +3549,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
                         World.RegionInfo.RegionLocY * Constants.RegionSize,
                         0);
 
-                    World.AssetCache.GetAsset(item.AssetID,
+                    World.CommsManager.AssetCache.GetAsset(item.AssetID,
                         delegate(UUID i, AssetBase a)
                         {
                             AssetLandmark lm = new AssetLandmark(a);
@@ -8851,7 +8851,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
         public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
         private void WithNotecard(UUID assetID, AssetRequestCallback cb)
         {
-            World.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false);
+            World.CommsManager.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false);
         }
 
         public LSL_String llGetNumberOfNotecardLines(string name)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 9658376..e4ef236 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1040,7 +1040,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
             + textLength.ToString() + "\n" + notecardData + "}\n";
 
             asset.Data = Encoding.ASCII.GetBytes(notecardData);
-            World.AssetCache.AddAsset(asset);
+            World.CommsManager.AssetCache.AddAsset(asset);
 
             // Create Task Entry
             TaskInventoryItem taskItem=new TaskInventoryItem();
-- 
cgit v1.1