mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Added (experimental) terrain elevate command to allow whole terrain to be elevated with positive or negative values
This commit is contained in:
@@ -477,6 +477,7 @@ namespace OpenSim.Region.Terrain
|
||||
resultText += "terrain erode thermal <talus> <rounds> <carry>\n";
|
||||
resultText += "terrain erode hydraulic <rain> <evaporation> <solubility> <frequency> <rounds>\n";
|
||||
resultText += "terrain multiply <val> - multiplies a terrain by <val>\n";
|
||||
resultText += "terrain elevate <val> - elevates a terrain by <val>\n";
|
||||
resultText += "terrain revert - reverts the terrain to the stored original\n";
|
||||
resultText += "terrain bake - saves the current terrain into the revert map\n";
|
||||
resultText +=
|
||||
@@ -524,6 +525,10 @@ namespace OpenSim.Region.Terrain
|
||||
SetRange(Convert.ToSingle(args[1]), Convert.ToSingle(args[2]));
|
||||
break;
|
||||
|
||||
case "elevate":
|
||||
Elevate(Convert.ToSingle(args[1]));
|
||||
break;
|
||||
|
||||
case "fill":
|
||||
heightmap.Fill(Convert.ToDouble(args[1]));
|
||||
tainted++;
|
||||
@@ -765,6 +770,16 @@ namespace OpenSim.Region.Terrain
|
||||
tainted++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds meters (positive or negative) to terrain height
|
||||
/// </summary>
|
||||
/// <param name="meters">Positive or negative value to add to new array</param>
|
||||
public void Elevate(float meters)
|
||||
{
|
||||
heightmap.Elevate((double)meters);
|
||||
tainted++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a file consisting of 256x256 doubles and imports it as an array into the map.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user