aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs41
2 files changed, 6 insertions, 41 deletions
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 {