* Added 'multiply' command since rescale doesnt exactly do what Adam wants.
0.1-prestable
Adam Frisby 2007-04-20 14:53:38 +00:00
parent ae8824985c
commit 984235c622
2 changed files with 10 additions and 0 deletions

View File

@ -541,6 +541,7 @@ namespace OpenSim
m_console.WriteLine("terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64' or 'IMG'");
m_console.WriteLine("terrain save <type> <filename> - saves a terrain to disk, type can be 'F32' or 'F64'");
m_console.WriteLine("terrain rescale <min> <max> - rescales a terrain to be between <min> and <max> meters high");
m_console.WriteLine("terrain multiply <val> - multiplies a terrain by <val>");
break;
case "seed":
@ -555,6 +556,10 @@ namespace OpenSim
LocalWorld.Terrain.setRange(Convert.ToSingle(args[1]), Convert.ToSingle(args[2]));
break;
case "multiply":
LocalWorld.Terrain *= Convert.ToDouble(args[1]);
break;
case "load":
switch (args[1].ToLower())
{

View File

@ -219,6 +219,11 @@ namespace OpenSim.Terrain
}
}
public static TerrainEngine operator *(TerrainEngine meep, Double val) {
meep.heightmap *= val;
return meep;
}
public float this[int x, int y]
{
get