aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
diff options
context:
space:
mode:
authorMW2007-04-06 19:08:24 +0000
committerMW2007-04-06 19:08:24 +0000
commit0311fef2447217fb87111835d82654cdc6c6dd31 (patch)
tree807f294533592c850794ee23377017a8085c0fb5 /OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
parentAdded getHeights1D() function to TerrainEngine (diff)
downloadopensim-SC_OLD-0311fef2447217fb87111835d82654cdc6c6dd31.zip
opensim-SC_OLD-0311fef2447217fb87111835d82654cdc6c6dd31.tar.gz
opensim-SC_OLD-0311fef2447217fb87111835d82654cdc6c6dd31.tar.bz2
opensim-SC_OLD-0311fef2447217fb87111835d82654cdc6c6dd31.tar.xz
Now back to compiling, just no terrain generation at the moment
Diffstat (limited to 'OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs')
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs9
1 files changed, 5 insertions, 4 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)