Attempted to fix Db4o/world thing (and failed, but it still runs!) will need a new class for the world data

Removed excess debug output
adam
gareth 2007-03-06 20:22:17 +00:00
parent d4cd213b32
commit 01536d901a
3 changed files with 17 additions and 17 deletions

View File

@ -131,19 +131,23 @@ namespace OpenSim
} }
public World LoadWorld() { public World LoadWorld() {
OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Looking for a world object in local DB"); OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Loading world....");
// IObjectSet world_result = db.Get(typeof(OpenSim.world.World)); World blank = new World();
// if(world_result.Count==1) { OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Looking for a heightmap in local DB");
// OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Found an OpenSim.world.World object in local database, loading"); IObjectSet world_result = db.Get(new float[65536]);
//return (World)world_result.Next(); if(world_result.Count>0) {
// } else { OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Found a heightmap in local database, loading");
OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Could not find the world or too many worlds! Constructing blank one"); blank.LandMap=(float[])world_result.Next();
World blank = new World(); } else {
OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Saving initial world state to disk"); OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - No heightmap found, generating new one");
//db.Set(blank); for(int i =0; i < 65536; i++) {
//db.Commit(); blank.LandMap[i] = 21.4989f;
return blank; }
// } OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Saving heightmap to local database");
db.Set(blank.LandMap);
db.Commit();
}
return blank;
} }
public void LoadFromGrid() { public void LoadFromGrid() {

View File

@ -231,7 +231,6 @@ namespace OpenSim
return; return;
} }
OpenSim_Main.localcons.WriteLine("Sending PacketAck");
int i = 0; int i = 0;

View File

@ -26,9 +26,6 @@ namespace OpenSim.world
OpenSim_Main.localcons.WriteLine("World.cs - creating LandMap"); OpenSim_Main.localcons.WriteLine("World.cs - creating LandMap");
terrainengine = new TerrainDecode(); terrainengine = new TerrainDecode();
LandMap = new float[65536]; LandMap = new float[65536];
for(int i =0; i < 65536; i++) {
LandMap[i] = 21.4989f;
}
} }