aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs5
-rw-r--r--OpenSim.Terrain.BasicTerrain/TerrainEngine.cs5
2 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index b2ee3b6..4321d8a 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -540,6 +540,7 @@ namespace OpenSim
540 m_console.WriteLine("terrain seed <seed> - sets the random seed value to <seed>"); 540 m_console.WriteLine("terrain seed <seed> - sets the random seed value to <seed>");
541 m_console.WriteLine("terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64' or 'IMG'"); 541 m_console.WriteLine("terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64' or 'IMG'");
542 m_console.WriteLine("terrain save <type> <filename> - saves a terrain to disk, type can be 'F32' or 'F64'"); 542 m_console.WriteLine("terrain save <type> <filename> - saves a terrain to disk, type can be 'F32' or 'F64'");
543 m_console.WriteLine("terrain rescale <min> <max> - rescales a terrain to be between <min> and <max> meters high");
543 break; 544 break;
544 545
545 case "seed": 546 case "seed":
@@ -550,6 +551,10 @@ namespace OpenSim
550 LocalWorld.Terrain.hills(); 551 LocalWorld.Terrain.hills();
551 break; 552 break;
552 553
554 case "rescale":
555 LocalWorld.Terrain.setRange(Convert.ToSingle(args[1]), Convert.ToSingle(args[2]));
556 break;
557
553 case "load": 558 case "load":
554 switch (args[1].ToLower()) 559 switch (args[1].ToLower())
555 { 560 {
diff --git a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
index 65ad3ac..f97045a 100644
--- a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
@@ -82,6 +82,11 @@ namespace OpenSim.Terrain
82 return heights; 82 return heights;
83 } 83 }
84 84
85 public void setRange(float min, float max)
86 {
87 heightmap.normalise((double)min, (double)max);
88 }
89
85 /// <summary> 90 /// <summary>
86 /// Loads a file consisting of 256x256 doubles and imports it as an array into the map. 91 /// Loads a file consisting of 256x256 doubles and imports it as an array into the map.
87 /// </summary> 92 /// </summary>