aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2007-11-04 13:48:15 +0000
committerMW2007-11-04 13:48:15 +0000
commit039f2c46c057569463ba970f4b3f33990debf7e2 (patch)
treec73edc783228c43080a5a0878fd8f8b62af5b487 /OpenSim
parentadd a IAssetProvider.CommitAssets() call to the grid asset server, when a ass... (diff)
downloadopensim-SC-039f2c46c057569463ba970f4b3f33990debf7e2.zip
opensim-SC-039f2c46c057569463ba970f4b3f33990debf7e2.tar.gz
opensim-SC-039f2c46c057569463ba970f4b3f33990debf7e2.tar.bz2
opensim-SC-039f2c46c057569463ba970f4b3f33990debf7e2.tar.xz
Added support for OpenSim application plugins (as requested by Adam), which use Mono.addins for loading/management. (which is a pure .net solution so works on both Mono and MS .net, and is under the MIT license, will add the source code for the library later). I also suggest we look into switching to using Mono.addins for our Region module loading management.
A little bit more refactoring of Scene.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/TextureDownloadModule.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs38
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs62
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs8
7 files changed, 70 insertions, 56 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index b8a8f42..666e0d2 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -44,7 +44,8 @@ using OpenSim.Region.Environment;
44using OpenSim.Region.Environment.Interfaces; 44using OpenSim.Region.Environment.Interfaces;
45using OpenSim.Region.Environment.Scenes; 45using OpenSim.Region.Environment.Scenes;
46using OpenSim.Region.Physics.Manager; 46using OpenSim.Region.Physics.Manager;
47 47using Mono.Addins;
48using Mono.Addins.Description;
48 49
49namespace OpenSim 50namespace OpenSim
50{ 51{
@@ -93,6 +94,8 @@ namespace OpenSim
93 : base() 94 : base()
94 { 95 {
95 IConfig startupConfig = configSource.Configs["Startup"]; 96 IConfig startupConfig = configSource.Configs["Startup"];
97
98 AddinManager.Initialize(".");
96 99
97 string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); 100 string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini");
98 101
@@ -275,6 +278,13 @@ namespace OpenSim
275 m_httpServer.AddStreamHandler(new SimStatusHandler()); 278 m_httpServer.AddStreamHandler(new SimStatusHandler());
276 } 279 }
277 280
281 MainLog.Instance.Verbose("Plugins", "Loading OpenSim application plugins");
282 foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes("/OpenSim/Startup"))
283 {
284 IApplicationPlugin plugin = (IApplicationPlugin)node.CreateInstance();
285 plugin.Initialise(this);
286 }
287
278 IRegionLoader regionLoader; 288 IRegionLoader regionLoader;
279 if (m_config.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") 289 if (m_config.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
280 { 290 {
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index 2bc3db8..2668812 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -177,7 +177,7 @@ namespace OpenSim.Region.Environment.Modules
177 asset.Description = "dynamic image"; 177 asset.Description = "dynamic image";
178 asset.Local = false; 178 asset.Local = false;
179 asset.Temporary = false; 179 asset.Temporary = false;
180 scene.commsManager.AssetCache.AddAsset(asset); 180 scene.AssetCache.AddAsset(asset);
181 181
182 LastAssetID = asset.FullID; 182 LastAssetID = asset.FullID;
183 183
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
index 5ba5941..98057f9 100644
--- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment.Modules
128 AssetRequest request = new AssetRequest(client, e.RequestedAssetID, e.DiscardLevel, e.PacketNumber); 128 AssetRequest request = new AssetRequest(client, e.RequestedAssetID, e.DiscardLevel, e.PacketNumber);
129 ClientRequests[client.AgentId].Add(e.RequestedAssetID, request); 129 ClientRequests[client.AgentId].Add(e.RequestedAssetID, request);
130 } 130 }
131 m_scene.commsManager.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback); 131 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback);
132 } 132 }
133 } 133 }
134 134
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 325153f..5d85c1d 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -91,8 +91,6 @@ namespace OpenSim.Region.Environment.Scenes
91 } 91 }
92 else 92 else
93 { 93 {
94 //newAvatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement;
95
96 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent."); 94 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent.");
97 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent."); 95 MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent.");
98 96
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 17f7566..138cb20 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Environment.Scenes
52 52
53 public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item) 53 public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item)
54 { 54 {
55 CachedUserInfo userInfo = commsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId); 55 CachedUserInfo userInfo = CommsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId);
56 if (userInfo != null) 56 if (userInfo != null)
57 { 57 {
58 userInfo.AddItem(remoteClient.AgentId, item); 58 userInfo.AddItem(remoteClient.AgentId, item);
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
74 74
75 public LLUUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID itemID, byte[] data) 75 public LLUUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID itemID, byte[] data)
76 { 76 {
77 CachedUserInfo userInfo = commsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId); 77 CachedUserInfo userInfo = CommsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId);
78 if (userInfo != null) 78 if (userInfo != null)
79 { 79 {
80 if (userInfo.RootFolder != null) 80 if (userInfo.RootFolder != null)
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Scenes
89 asset.InvType = (sbyte) item.invType; 89 asset.InvType = (sbyte) item.invType;
90 asset.Name = item.inventoryName; 90 asset.Name = item.inventoryName;
91 asset.Data = data; 91 asset.Data = data;
92 commsManager.AssetCache.AddAsset(asset); 92 AssetCache.AddAsset(asset);
93 93
94 item.assetID = asset.FullID; 94 item.assetID = asset.FullID;
95 userInfo.UpdateItem(remoteClient.AgentId, item); 95 userInfo.UpdateItem(remoteClient.AgentId, item);
@@ -114,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes
114 public void UDPUpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, 114 public void UDPUpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID,
115 LLUUID itemID) 115 LLUUID itemID)
116 { 116 {
117 CachedUserInfo userInfo = commsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId); 117 CachedUserInfo userInfo = CommsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId);
118 if (userInfo != null) 118 if (userInfo != null)
119 { 119 {
120 if (userInfo.RootFolder != null) 120 if (userInfo.RootFolder != null)
@@ -123,13 +123,13 @@ namespace OpenSim.Region.Environment.Scenes
123 if (item != null) 123 if (item != null)
124 { 124 {
125 AgentAssetTransactions transactions = 125 AgentAssetTransactions transactions =
126 commsManager.TransactionsManager.GetUserTransActions(remoteClient.AgentId); 126 CommsManager.TransactionsManager.GetUserTransActions(remoteClient.AgentId);
127 if (transactions != null) 127 if (transactions != null)
128 { 128 {
129 AssetBase asset = null; 129 AssetBase asset = null;
130 bool addToCache = false; 130 bool addToCache = false;
131 131
132 asset = commsManager.AssetCache.GetAsset(assetID); 132 asset = AssetCache.GetAsset(assetID);
133 if (asset == null) 133 if (asset == null)
134 { 134 {
135 asset = transactions.GetTransactionAsset(transactionID); 135 asset = transactions.GetTransactionAsset(transactionID);
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Environment.Scenes
148 148
149 if (addToCache) 149 if (addToCache)
150 { 150 {
151 commsManager.AssetCache.AddAsset(asset); 151 AssetCache.AddAsset(asset);
152 } 152 }
153 153
154 userInfo.UpdateItem(remoteClient.AgentId, item); 154 userInfo.UpdateItem(remoteClient.AgentId, item);
@@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Scenes
179 { 179 {
180 if (transActionID == LLUUID.Zero) 180 if (transActionID == LLUUID.Zero)
181 { 181 {
182 CachedUserInfo userInfo = commsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId); 182 CachedUserInfo userInfo = CommsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId);
183 if (userInfo != null) 183 if (userInfo != null)
184 { 184 {
185 AssetBase asset = new AssetBase(); 185 AssetBase asset = new AssetBase();
@@ -189,7 +189,7 @@ namespace OpenSim.Region.Environment.Scenes
189 asset.Type = type; 189 asset.Type = type;
190 asset.FullID = LLUUID.Random(); 190 asset.FullID = LLUUID.Random();
191 asset.Data = new byte[1]; 191 asset.Data = new byte[1];
192 commsManager.AssetCache.AddAsset(asset); 192 AssetCache.AddAsset(asset);
193 193
194 InventoryItemBase item = new InventoryItemBase(); 194 InventoryItemBase item = new InventoryItemBase();
195 item.avatarID = remoteClient.AgentId; 195 item.avatarID = remoteClient.AgentId;
@@ -210,7 +210,7 @@ namespace OpenSim.Region.Environment.Scenes
210 } 210 }
211 else 211 else
212 { 212 {
213 commsManager.TransactionsManager.HandleInventoryFromTransaction(remoteClient, transActionID, folderID, 213 CommsManager.TransactionsManager.HandleInventoryFromTransaction(remoteClient, transActionID, folderID,
214 callbackID, description, name, invType, 214 callbackID, description, name, invType,
215 type, wearableType, nextOwnerMask); 215 type, wearableType, nextOwnerMask);
216 //System.Console.WriteLine("request to create inventory item from transaction " + transActionID); 216 //System.Console.WriteLine("request to create inventory item from transaction " + transActionID);
@@ -269,7 +269,7 @@ namespace OpenSim.Region.Environment.Scenes
269 269
270 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) 270 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
271 { 271 {
272 CachedUserInfo userInfo = commsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId); 272 CachedUserInfo userInfo = CommsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId);
273 LLUUID copyID = LLUUID.Random(); 273 LLUUID copyID = LLUUID.Random();
274 if (userInfo != null) 274 if (userInfo != null)
275 { 275 {
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes
284 { 284 {
285 isTexture = true; 285 isTexture = true;
286 } 286 }
287 AssetBase rezAsset = commsManager.AssetCache.GetAsset(item.assetID, isTexture); 287 AssetBase rezAsset = AssetCache.GetAsset(item.assetID, isTexture);
288 if (rezAsset != null) 288 if (rezAsset != null)
289 { 289 {
290 string script = Util.FieldToString(rezAsset.Data); 290 string script = Util.FieldToString(rezAsset.Data);
@@ -295,7 +295,7 @@ namespace OpenSim.Region.Environment.Scenes
295 else 295 else
296 { 296 {
297 //lets try once more incase the asset cache is being slow getting the asset from server 297 //lets try once more incase the asset cache is being slow getting the asset from server
298 rezAsset = commsManager.AssetCache.GetAsset(item.assetID, isTexture); 298 rezAsset = AssetCache.GetAsset(item.assetID, isTexture);
299 if (rezAsset != null) 299 if (rezAsset != null)
300 { 300 {
301 string script = Util.FieldToString(rezAsset.Data); 301 string script = Util.FieldToString(rezAsset.Data);
@@ -360,7 +360,7 @@ namespace OpenSim.Region.Environment.Scenes
360 if (PermissionsMngr.CanDeRezObject(remoteClient.AgentId, ((SceneObjectGroup) selectedEnt).UUID)) 360 if (PermissionsMngr.CanDeRezObject(remoteClient.AgentId, ((SceneObjectGroup) selectedEnt).UUID))
361 { 361 {
362 string sceneObjectXml = ((SceneObjectGroup) selectedEnt).ToXmlString(); 362 string sceneObjectXml = ((SceneObjectGroup) selectedEnt).ToXmlString();
363 CachedUserInfo userInfo = commsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId); 363 CachedUserInfo userInfo = CommsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId);
364 if (userInfo != null) 364 if (userInfo != null)
365 { 365 {
366 AssetBase asset = new AssetBase(); 366 AssetBase asset = new AssetBase();
@@ -371,7 +371,7 @@ namespace OpenSim.Region.Environment.Scenes
371 asset.Type = 6; 371 asset.Type = 6;
372 asset.FullID = LLUUID.Random(); 372 asset.FullID = LLUUID.Random();
373 asset.Data = Helpers.StringToField(sceneObjectXml); 373 asset.Data = Helpers.StringToField(sceneObjectXml);
374 commsManager.AssetCache.AddAsset(asset); 374 AssetCache.AddAsset(asset);
375 375
376 376
377 InventoryItemBase item = new InventoryItemBase(); 377 InventoryItemBase item = new InventoryItemBase();
@@ -407,7 +407,7 @@ namespace OpenSim.Region.Environment.Scenes
407 rootPart.PhysActor = null; 407 rootPart.PhysActor = null;
408 } 408 }
409 409
410 storageManager.DataStore.RemoveObject(group.UUID, m_regInfo.RegionID); 410 m_storageManager.DataStore.RemoveObject(group.UUID, m_regInfo.RegionID);
411 group.DeleteGroup(); 411 group.DeleteGroup();
412 412
413 lock (Entities) 413 lock (Entities)
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Scenes
419 419
420 public void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos) 420 public void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos)
421 { 421 {
422 CachedUserInfo userInfo = commsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId); 422 CachedUserInfo userInfo = CommsManager.UserProfileCache.GetUserDetails(remoteClient.AgentId);
423 if (userInfo != null) 423 if (userInfo != null)
424 { 424 {
425 if (userInfo.RootFolder != null) 425 if (userInfo.RootFolder != null)
@@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Scenes
427 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); 427 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
428 if (item != null) 428 if (item != null)
429 { 429 {
430 AssetBase rezAsset = commsManager.AssetCache.GetAsset(item.assetID, false); 430 AssetBase rezAsset = AssetCache.GetAsset(item.assetID, false);
431 if (rezAsset != null) 431 if (rezAsset != null)
432 { 432 {
433 AddRezObject(Util.FieldToString(rezAsset.Data), pos); 433 AddRezObject(Util.FieldToString(rezAsset.Data), pos);
@@ -437,7 +437,7 @@ namespace OpenSim.Region.Environment.Scenes
437 else 437 else
438 { 438 {
439 //lets try once more incase the asset cache is being slow getting the asset from server 439 //lets try once more incase the asset cache is being slow getting the asset from server
440 rezAsset = commsManager.AssetCache.GetAsset(item.assetID, false); 440 rezAsset = AssetCache.GetAsset(item.assetID, false);
441 if (rezAsset != null) 441 if (rezAsset != null)
442 { 442 {
443 AddRezObject(Util.FieldToString(rezAsset.Data), pos); 443 AddRezObject(Util.FieldToString(rezAsset.Data), pos);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index a956eb2..49d2268 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -70,13 +70,13 @@ namespace OpenSim.Region.Environment.Scenes
70 private readonly Mutex updateLock; 70 private readonly Mutex updateLock;
71 71
72 protected ModuleLoader m_moduleLoader; 72 protected ModuleLoader m_moduleLoader;
73 protected StorageManager storageManager; 73 protected StorageManager m_storageManager;
74 protected AgentCircuitManager authenticateHandler; 74 protected AgentCircuitManager m_authenticateHandler;
75 public CommunicationsManager commsManager; 75 public CommunicationsManager CommsManager;
76 // protected XferManager xferManager; 76 // protected XferManager xferManager;
77 protected SceneCommunicationService m_sceneGridService; 77 protected SceneCommunicationService m_sceneGridService;
78 78
79 protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); 79 protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>();
80 protected BaseHttpServer httpListener; 80 protected BaseHttpServer httpListener;
81 81
82 protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>(); 82 protected Dictionary<string, IRegionModule> Modules = new Dictionary<string, IRegionModule>();
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Environment.Scenes
116 116
117 public AgentCircuitManager AuthenticateHandler 117 public AgentCircuitManager AuthenticateHandler
118 { 118 {
119 get { return authenticateHandler; } 119 get { return m_authenticateHandler; }
120 } 120 }
121 121
122 private readonly LandManager m_LandManager; 122 private readonly LandManager m_LandManager;
@@ -191,11 +191,11 @@ namespace OpenSim.Region.Environment.Scenes
191 updateLock = new Mutex(false); 191 updateLock = new Mutex(false);
192 192
193 m_moduleLoader = moduleLoader; 193 m_moduleLoader = moduleLoader;
194 authenticateHandler = authen; 194 m_authenticateHandler = authen;
195 commsManager = commsMan; 195 CommsManager = commsMan;
196 m_sceneGridService = sceneGridService; 196 m_sceneGridService = sceneGridService;
197 storageManager = storeManager; 197 m_storageManager = storeManager;
198 assetCache = assetCach; 198 AssetCache = assetCach;
199 m_regInfo = regInfo; 199 m_regInfo = regInfo;
200 m_regionHandle = m_regInfo.RegionHandle; 200 m_regionHandle = m_regInfo.RegionHandle;
201 m_regionName = m_regInfo.RegionName; 201 m_regionName = m_regInfo.RegionName;
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Environment.Scenes
393 phyScene.SetTerrain(Terrain.GetHeights1D()); 393 phyScene.SetTerrain(Terrain.GetHeights1D());
394 } 394 }
395 395
396 storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); 396 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
397 397
398 float[] terData = Terrain.GetHeights1D(); 398 float[] terData = Terrain.GetHeights1D();
399 399
@@ -470,7 +470,7 @@ namespace OpenSim.Region.Environment.Scenes
470 /// <returns></returns> 470 /// <returns></returns>
471 public bool Backup() 471 public bool Backup()
472 { 472 {
473 EventManager.TriggerOnBackup(storageManager.DataStore); 473 EventManager.TriggerOnBackup(m_storageManager.DataStore);
474 return true; 474 return true;
475 } 475 }
476 476
@@ -486,7 +486,7 @@ namespace OpenSim.Region.Environment.Scenes
486 { 486 {
487 try 487 try
488 { 488 {
489 double[,] map = storageManager.DataStore.LoadTerrain(RegionInfo.RegionID); 489 double[,] map = m_storageManager.DataStore.LoadTerrain(RegionInfo.RegionID);
490 if (map == null) 490 if (map == null)
491 { 491 {
492 if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) 492 if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile))
@@ -494,7 +494,7 @@ namespace OpenSim.Region.Environment.Scenes
494 MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain."); 494 MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain.");
495 Terrain.HillsGenerator(); 495 Terrain.HillsGenerator();
496 496
497 storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); 497 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
498 } 498 }
499 else 499 else
500 { 500 {
@@ -509,7 +509,7 @@ namespace OpenSim.Region.Environment.Scenes
509 "No terrain found in database or default. Generating a new terrain."); 509 "No terrain found in database or default. Generating a new terrain.");
510 Terrain.HillsGenerator(); 510 Terrain.HillsGenerator();
511 } 511 }
512 storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); 512 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
513 } 513 }
514 } 514 }
515 else 515 else
@@ -539,7 +539,7 @@ namespace OpenSim.Region.Environment.Scenes
539 asset.Name = "terrainImage"; 539 asset.Name = "terrainImage";
540 asset.Type = 0; 540 asset.Type = 0;
541 asset.Temporary = true; 541 asset.Temporary = true;
542 commsManager.AssetCache.AddAsset(asset); 542 AssetCache.AddAsset(asset);
543 } 543 }
544 544
545 #endregion 545 #endregion
@@ -552,7 +552,7 @@ namespace OpenSim.Region.Environment.Scenes
552 public virtual void LoadPrimsFromStorage() 552 public virtual void LoadPrimsFromStorage()
553 { 553 {
554 MainLog.Instance.Verbose("Loading objects from datastore"); 554 MainLog.Instance.Verbose("Loading objects from datastore");
555 List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.RegionID); 555 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID);
556 foreach (SceneObjectGroup prim in PrimsFromDB) 556 foreach (SceneObjectGroup prim in PrimsFromDB)
557 { 557 {
558 AddEntityFromStorage(prim); 558 AddEntityFromStorage(prim);
@@ -790,8 +790,8 @@ namespace OpenSim.Region.Environment.Scenes
790 CreateAndAddScenePresence(client, child); 790 CreateAndAddScenePresence(client, child);
791 791
792 m_LandManager.sendParcelOverlay(client); 792 m_LandManager.sendParcelOverlay(client);
793 commsManager.UserProfileCache.AddNewUser(client.AgentId); 793 CommsManager.UserProfileCache.AddNewUser(client.AgentId);
794 commsManager.TransactionsManager.AddUser(client.AgentId); 794 CommsManager.TransactionsManager.AddUser(client.AgentId);
795 } 795 }
796 796
797 protected virtual void SubscribeToClientEvents(IClientAPI client) 797 protected virtual void SubscribeToClientEvents(IClientAPI client)
@@ -818,7 +818,7 @@ namespace OpenSim.Region.Environment.Scenes
818 client.OnGrabUpdate += m_innerScene.MoveObject; 818 client.OnGrabUpdate += m_innerScene.MoveObject;
819 client.OnDeRezObject += DeRezObject; 819 client.OnDeRezObject += DeRezObject;
820 client.OnRezObject += RezObject; 820 client.OnRezObject += RezObject;
821 client.OnNameFromUUIDRequest += commsManager.HandleUUIDNameRequest; 821 client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest;
822 client.OnObjectDescription += m_innerScene.PrimDescription; 822 client.OnObjectDescription += m_innerScene.PrimDescription;
823 client.OnObjectName += m_innerScene.PrimName; 823 client.OnObjectName += m_innerScene.PrimName;
824 client.OnLinkObjects += m_innerScene.LinkObjects; 824 client.OnLinkObjects += m_innerScene.LinkObjects;
@@ -837,13 +837,13 @@ namespace OpenSim.Region.Environment.Scenes
837 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); 837 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
838 838
839 client.OnCreateNewInventoryItem += CreateNewInventoryItem; 839 client.OnCreateNewInventoryItem += CreateNewInventoryItem;
840 client.OnCreateNewInventoryFolder += commsManager.UserProfileCache.HandleCreateInventoryFolder; 840 client.OnCreateNewInventoryFolder += CommsManager.UserProfileCache.HandleCreateInventoryFolder;
841 client.OnFetchInventoryDescendents += commsManager.UserProfileCache.HandleFecthInventoryDescendents; 841 client.OnFetchInventoryDescendents += CommsManager.UserProfileCache.HandleFecthInventoryDescendents;
842 client.OnRequestTaskInventory += RequestTaskInventory; 842 client.OnRequestTaskInventory += RequestTaskInventory;
843 client.OnFetchInventory += commsManager.UserProfileCache.HandleFetchInventory; 843 client.OnFetchInventory += CommsManager.UserProfileCache.HandleFetchInventory;
844 client.OnUpdateInventoryItem += UDPUpdateInventoryItemAsset; 844 client.OnUpdateInventoryItem += UDPUpdateInventoryItemAsset;
845 client.OnAssetUploadRequest += commsManager.TransactionsManager.HandleUDPUploadRequest; 845 client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
846 client.OnXferReceive += commsManager.TransactionsManager.HandleXfer; 846 client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
847 client.OnRezScript += RezScript; 847 client.OnRezScript += RezScript;
848 client.OnRemoveTaskItem += RemoveTaskInventory; 848 client.OnRemoveTaskItem += RemoveTaskInventory;
849 849
@@ -904,7 +904,7 @@ namespace OpenSim.Region.Environment.Scenes
904 avatar.Close(); 904 avatar.Close();
905 905
906 // Remove client agent from profile, so new logins will work 906 // Remove client agent from profile, so new logins will work
907 commsManager.UserService.clearUserAgent(agentID); 907 CommsManager.UserService.clearUserAgent(agentID);
908 908
909 return; 909 return;
910 } 910 }
@@ -926,7 +926,7 @@ namespace OpenSim.Region.Environment.Scenes
926 if (Entities.ContainsKey(entID)) 926 if (Entities.ContainsKey(entID))
927 { 927 {
928 Entities.Remove(entID); 928 Entities.Remove(entID);
929 storageManager.DataStore.RemoveObject(entID, m_regInfo.RegionID); 929 m_storageManager.DataStore.RemoveObject(entID, m_regInfo.RegionID);
930 return true; 930 return true;
931 } 931 }
932 return false; 932 return false;
@@ -963,7 +963,7 @@ namespace OpenSim.Region.Environment.Scenes
963 if (agent.CapsPath != "") 963 if (agent.CapsPath != "")
964 { 964 {
965 Caps cap = 965 Caps cap =
966 new Caps(commsManager.AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, 966 new Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port,
967 agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); 967 agent.CapsPath, agent.AgentID, m_dumpAssetsToFile);
968 968
969 Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + 969 Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() +
@@ -971,18 +971,18 @@ namespace OpenSim.Region.Environment.Scenes
971 cap.RegisterHandlers(); 971 cap.RegisterHandlers();
972 cap.AddNewInventoryItem = AddInventoryItem; 972 cap.AddNewInventoryItem = AddInventoryItem;
973 cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; 973 cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset;
974 if (capsHandlers.ContainsKey(agent.AgentID)) 974 if (m_capsHandlers.ContainsKey(agent.AgentID))
975 { 975 {
976 //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + 976 //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " +
977 // agent.AgentID.ToStringHyphenated()); 977 // agent.AgentID.ToStringHyphenated());
978 capsHandlers[agent.AgentID] = cap; 978 m_capsHandlers[agent.AgentID] = cap;
979 } 979 }
980 else 980 else
981 { 981 {
982 capsHandlers.Add(agent.AgentID, cap); 982 m_capsHandlers.Add(agent.AgentID, cap);
983 } 983 }
984 } 984 }
985 authenticateHandler.AddNewCircuit(agent.circuitcode, agent); 985 m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
986 } 986 }
987 } 987 }
988 988
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 1494437..b0ec352 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -68,7 +68,13 @@ namespace OpenSim.Region.Environment.Scenes
68 68
69 protected object m_syncRoot = new object(); 69 protected object m_syncRoot = new object();
70 private uint m_nextLocalId = 8880000; 70 private uint m_nextLocalId = 8880000;
71 protected AssetCache assetCache; 71 private AssetCache m_assetCache;
72
73 public AssetCache AssetCache
74 {
75 get { return m_assetCache; }
76 set { m_assetCache = value; }
77 }
72 78
73 #endregion 79 #endregion
74 80