aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Config.cs30
-rw-r--r--src/OpenSimClient.cs1
-rw-r--r--src/world/World.cs3
3 files changed, 17 insertions, 17 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() {
diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs
index 0e956c3..655ebfe 100644
--- a/src/OpenSimClient.cs
+++ b/src/OpenSimClient.cs
@@ -231,7 +231,6 @@ namespace OpenSim
231 return; 231 return;
232 } 232 }
233 233
234 OpenSim_Main.localcons.WriteLine("Sending PacketAck");
235 234
236 235
237 int i = 0; 236 int i = 0;
diff --git a/src/world/World.cs b/src/world/World.cs
index 2f73bd5..83788cd 100644
--- a/src/world/World.cs
+++ b/src/world/World.cs
@@ -26,9 +26,6 @@ namespace OpenSim.world
26 OpenSim_Main.localcons.WriteLine("World.cs - creating LandMap"); 26 OpenSim_Main.localcons.WriteLine("World.cs - creating LandMap");
27 terrainengine = new TerrainDecode(); 27 terrainengine = new TerrainDecode();
28 LandMap = new float[65536]; 28 LandMap = new float[65536];
29 for(int i =0; i < 65536; i++) {
30 LandMap[i] = 21.4989f;
31 }
32 29
33 } 30 }
34 31