aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/world/World.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/world/World.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.cs23
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs
index 68516d2..ef6833c 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.cs
@@ -417,10 +417,27 @@ namespace OpenSim.world
417 float[] map = this.localStorage.LoadWorld(); 417 float[] map = this.localStorage.LoadWorld();
418 if (map == null) 418 if (map == null)
419 { 419 {
420 Console.WriteLine("creating new terrain"); 420 if (string.IsNullOrEmpty(this.m_regInfo.TerrainFile))
421 this.Terrain.hills(); 421 {
422 Console.WriteLine("No default terrain, procedurally generating...");
423 this.Terrain.hills();
422 424
423 this.localStorage.SaveMap(this.Terrain.getHeights1D()); 425 this.localStorage.SaveMap(this.Terrain.getHeights1D());
426 }
427 else
428 {
429 try
430 {
431 this.Terrain.loadFromFileF32(this.m_regInfo.TerrainFile);
432 this.Terrain *= this.m_regInfo.TerrainMultiplier;
433 }
434 catch (Exception e)
435 {
436 Console.WriteLine("Unable to load default terrain (" + e.ToString() + "), procedurally generating instead...");
437 Terrain.hills();
438 }
439 this.localStorage.SaveMap(this.Terrain.getHeights1D());
440 }
424 } 441 }
425 else 442 else
426 { 443 {