diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index b2ee3b66cb..4321d8a888 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -540,6 +540,7 @@ namespace OpenSim m_console.WriteLine("terrain seed - sets the random seed value to "); m_console.WriteLine("terrain load - loads a terrain from disk, type can be 'F32', 'F64' or 'IMG'"); m_console.WriteLine("terrain save - saves a terrain to disk, type can be 'F32' or 'F64'"); + m_console.WriteLine("terrain rescale - rescales a terrain to be between and meters high"); break; case "seed": @@ -550,6 +551,10 @@ namespace OpenSim LocalWorld.Terrain.hills(); break; + case "rescale": + LocalWorld.Terrain.setRange(Convert.ToSingle(args[1]), Convert.ToSingle(args[2])); + break; + case "load": switch (args[1].ToLower()) { diff --git a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs index 65ad3acdf9..f97045a422 100644 --- a/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs @@ -82,6 +82,11 @@ namespace OpenSim.Terrain return heights; } + public void setRange(float min, float max) + { + heightmap.normalise((double)min, (double)max); + } + /// /// Loads a file consisting of 256x256 doubles and imports it as an array into the map. ///