diff options
Diffstat (limited to 'OpenSim.Storage/LocalStorageDb4o')
-rw-r--r-- | OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | 9 | ||||
-rw-r--r-- | OpenSim.Storage/LocalStorageDb4o/MapStorage.cs | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs index cdab9ba..b5fa79b 100644 --- a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | |||
@@ -118,11 +118,11 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | public float[] LoadWorld() | 121 | public float[,] LoadWorld() |
122 | { | 122 | { |
123 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Loading world...."); | 123 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Loading world...."); |
124 | //World blank = new World(); | 124 | //World blank = new World(); |
125 | float[] heightmap = null; | 125 | float[,] heightmap = null; |
126 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Looking for a heightmap in local DB"); | 126 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Looking for a heightmap in local DB"); |
127 | IObjectSet world_result = db.Get(typeof(MapStorage)); | 127 | IObjectSet world_result = db.Get(typeof(MapStorage)); |
128 | if (world_result.Count > 0) | 128 | if (world_result.Count > 0) |
@@ -137,7 +137,8 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
137 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one"); | 137 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one"); |
138 | HeightmapGenHills hills = new HeightmapGenHills(); | 138 | HeightmapGenHills hills = new HeightmapGenHills(); |
139 | // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); | 139 | // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); |
140 | heightmap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); | 140 | // heightmap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); |
141 | heightmap = new float[256, 256]; | ||
141 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Saving heightmap to local database"); | 142 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Saving heightmap to local database"); |
142 | MapStorage map = new MapStorage(); | 143 | MapStorage map = new MapStorage(); |
143 | map.Map = heightmap; //blank.LandMap; | 144 | map.Map = heightmap; //blank.LandMap; |
@@ -147,7 +148,7 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
147 | return heightmap; | 148 | return heightmap; |
148 | } | 149 | } |
149 | 150 | ||
150 | public void SaveMap(float[] heightmap) | 151 | public void SaveMap(float[,] heightmap) |
151 | { | 152 | { |
152 | IObjectSet world_result = db.Get(typeof(MapStorage)); | 153 | IObjectSet world_result = db.Get(typeof(MapStorage)); |
153 | if (world_result.Count > 0) | 154 | if (world_result.Count > 0) |
diff --git a/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs index db590ff..dc5793e 100644 --- a/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs | |||
@@ -6,7 +6,7 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
6 | { | 6 | { |
7 | public class MapStorage | 7 | public class MapStorage |
8 | { | 8 | { |
9 | public float[] Map; | 9 | public float[,] Map; |
10 | 10 | ||
11 | public MapStorage() | 11 | public MapStorage() |
12 | { | 12 | { |