diff options
author | gareth | 2007-03-06 20:22:17 +0000 |
---|---|---|
committer | gareth | 2007-03-06 20:22:17 +0000 |
commit | 01536d901aaa5c31cb5d2b83e9afe8555767f146 (patch) | |
tree | db7f0c5a3a37200307d0de6821f6f6cd308aa136 /src/Config.cs | |
parent | Updated help message on console (diff) | |
download | opensim-SC-01536d901aaa5c31cb5d2b83e9afe8555767f146.zip opensim-SC-01536d901aaa5c31cb5d2b83e9afe8555767f146.tar.gz opensim-SC-01536d901aaa5c31cb5d2b83e9afe8555767f146.tar.bz2 opensim-SC-01536d901aaa5c31cb5d2b83e9afe8555767f146.tar.xz |
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
Diffstat (limited to 'src/Config.cs')
-rw-r--r-- | src/Config.cs | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/Config.cs b/src/Config.cs index 55bcdfe..3a9c355 100644 --- a/src/Config.cs +++ b/src/Config.cs | |||
@@ -131,19 +131,23 @@ namespace OpenSim | |||
131 | } | 131 | } |
132 | 132 | ||
133 | public World LoadWorld() { | 133 | public World LoadWorld() { |
134 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Looking for a world object in local DB"); | 134 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Loading world...."); |
135 | // IObjectSet world_result = db.Get(typeof(OpenSim.world.World)); | 135 | World blank = new World(); |
136 | // if(world_result.Count==1) { | 136 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Looking for a heightmap in local DB"); |
137 | // OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Found an OpenSim.world.World object in local database, loading"); | 137 | IObjectSet world_result = db.Get(new float[65536]); |
138 | //return (World)world_result.Next(); | 138 | if(world_result.Count>0) { |
139 | // } else { | 139 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Found a heightmap in local database, loading"); |
140 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Could not find the world or too many worlds! Constructing blank one"); | 140 | blank.LandMap=(float[])world_result.Next(); |
141 | World blank = new World(); | 141 | } else { |
142 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Saving initial world state to disk"); | 142 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - No heightmap found, generating new one"); |
143 | //db.Set(blank); | 143 | for(int i =0; i < 65536; i++) { |
144 | //db.Commit(); | 144 | blank.LandMap[i] = 21.4989f; |
145 | return blank; | 145 | } |
146 | // } | 146 | OpenSim_Main.localcons.WriteLine("Config.cs:LoadWorld() - Saving heightmap to local database"); |
147 | db.Set(blank.LandMap); | ||
148 | db.Commit(); | ||
149 | } | ||
150 | return blank; | ||
147 | } | 151 | } |
148 | 152 | ||
149 | public void LoadFromGrid() { | 153 | public void LoadFromGrid() { |