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

View File

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

View File

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