aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs5
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs41
4 files changed, 9 insertions, 45 deletions
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 375306d..e0339d9 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -111,7 +111,6 @@ namespace OpenSim.Region.ClientStack
111 111
112 udpServer.LocalWorld = scene; 112 udpServer.LocalWorld = scene;
113 113
114 scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll");
115 scene.LoadWorldMap(); 114 scene.LoadWorldMap();
116 115
117 scene.PhysScene = GetPhysicsScene( ); 116 scene.PhysScene = GetPhysicsScene( );
@@ -124,13 +123,13 @@ namespace OpenSim.Region.ClientStack
124 { 123 {
125 m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); 124 m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]");
126 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; 125 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
127 scene.localStorage.LoadLandObjects((ILocalStorageLandObjectReceiver)scene.LandManager); 126 //TODO: Load parcels from storageManager
128 } 127 }
129 else 128 else
130 { 129 {
131 m_log.Notice("Parcels - No master avatar found, using null."); 130 m_log.Notice("Parcels - No master avatar found, using null.");
132 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero; 131 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero;
133 scene.localStorage.LoadLandObjects((ILocalStorageLandObjectReceiver)scene.LandManager); 132 //TODO: Load parcels from storageManager
134 } 133 }
135 scene.performParcelPrimCountUpdate(); 134 scene.performParcelPrimCountUpdate();
136 scene.StartTimer(); 135 scene.StartTimer();
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index a596fae..be2913b 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.LandManagement
174 } 174 }
175 } 175 }
176 } 176 }
177 m_world.localStorage.RemoveLandObject(landList[local_id].landData); 177 // TODO: Put event here for storage manager to bind to.
178 landList.Remove(local_id); 178 landList.Remove(local_id);
179 } 179 }
180 180
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1ba23b4..3abd96d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -439,7 +439,11 @@ namespace OpenSim.Region.Environment.Scenes
439 public void LoadPrimsFromStorage() 439 public void LoadPrimsFromStorage()
440 { 440 {
441 MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); 441 MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives");
442 localStorage.LoadPrimitives(this); 442 List<SceneObject> NewObjectsList = storageManager.DataStore.LoadObjects();
443 foreach (SceneObject obj in NewObjectsList)
444 {
445 this.Objects.Add(obj.rootUUID, obj);
446 }
443 } 447 }
444 448
445 /// <summary> 449 /// <summary>
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 4326553..2c50e4d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -48,7 +48,6 @@ namespace OpenSim.Region.Environment.Scenes
48 public TerrainEngine Terrain; 48 public TerrainEngine Terrain;
49 49
50 protected string m_datastore; 50 protected string m_datastore;
51 public ILocalStorage localStorage;
52 51
53 protected object m_syncRoot = new object(); 52 protected object m_syncRoot = new object();
54 private uint m_nextLocalId = 8880000; 53 private uint m_nextLocalId = 8880000;
@@ -70,44 +69,6 @@ namespace OpenSim.Region.Environment.Scenes
70 public abstract void LoadWorldMap(); 69 public abstract void LoadWorldMap();
71 70
72 /// <summary> 71 /// <summary>
73 /// Loads a new storage subsystem from a named library
74 /// </summary>
75 /// <param name="dllName">Storage Library</param>
76 /// <returns>Successful or not</returns>
77 public bool LoadStorageDLL(string dllName)
78 {
79 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
80 ILocalStorage store = null;
81
82 foreach (Type pluginType in pluginAssembly.GetTypes())
83 {
84 if (pluginType.IsPublic)
85 {
86 if (!pluginType.IsAbstract)
87 {
88 Type typeInterface = pluginType.GetInterface("ILocalStorage", true);
89
90 if (typeInterface != null)
91 {
92 ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
93 store = plug;
94
95 store.Initialise(this.m_datastore);
96 break;
97 }
98
99 typeInterface = null;
100 }
101 }
102 }
103 pluginAssembly = null;
104 this.localStorage = store;
105 return (store == null);
106
107 }
108
109
110 /// <summary>
111 /// Send the region heightmap to the client 72 /// Send the region heightmap to the client
112 /// </summary> 73 /// </summary>
113 /// <param name="RemoteClient">Client to send to</param> 74 /// <param name="RemoteClient">Client to send to</param>
@@ -173,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes
173 { 134 {
174 try 135 try
175 { 136 {
176 this.localStorage.ShutDown(); 137 //TODO: Add cleanup code for storage manager, etc.
177 } 138 }
178 catch (Exception e) 139 catch (Exception e)
179 { 140 {