porting console commands from raw2sculpt 3.2
parent
d53ef3b302
commit
952b3448a6
|
@ -1088,6 +1088,32 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
CheckForTerrainUpdates();
|
CheckForTerrainUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InterfaceMinTerrain(Object[] args)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
for (x = 0; x < m_channel.Width; x++)
|
||||||
|
{
|
||||||
|
for (y = 0; y < m_channel.Height; y++)
|
||||||
|
{
|
||||||
|
m_channel[x, y] = Math.Max((double)args[0], m_channel[x, y]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CheckForTerrainUpdates();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InterfaceMaxTerrain(Object[] args)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
for (x = 0; x < m_channel.Width; x++)
|
||||||
|
{
|
||||||
|
for (y = 0; y < m_channel.Height; y++)
|
||||||
|
{
|
||||||
|
m_channel[x, y] = Math.Min((double)args[0], m_channel[x, y]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CheckForTerrainUpdates();
|
||||||
|
}
|
||||||
|
|
||||||
private void InterfaceShowDebugStats(Object[] args)
|
private void InterfaceShowDebugStats(Object[] args)
|
||||||
{
|
{
|
||||||
double max = Double.MinValue;
|
double max = Double.MinValue;
|
||||||
|
@ -1224,6 +1250,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
rescaleCommand.AddArgument("min", "min terrain height after rescaling", "Double");
|
rescaleCommand.AddArgument("min", "min terrain height after rescaling", "Double");
|
||||||
rescaleCommand.AddArgument("max", "max terrain height after rescaling", "Double");
|
rescaleCommand.AddArgument("max", "max terrain height after rescaling", "Double");
|
||||||
|
|
||||||
|
Command minCommand = new Command("min", CommandIntentions.COMMAND_HAZARDOUS, InterfaceMinTerrain, "Sets the minimum terrain height to the specified value.");
|
||||||
|
minCommand.AddArgument("min", "terrain height to use as minimum", "Double");
|
||||||
|
|
||||||
|
Command maxCommand = new Command("max", CommandIntentions.COMMAND_HAZARDOUS, InterfaceMaxTerrain, "Sets the maximum terrain height to the specified value.");
|
||||||
|
maxCommand.AddArgument("min", "terrain height to use as maximum", "Double");
|
||||||
|
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
Command showDebugStatsCommand =
|
Command showDebugStatsCommand =
|
||||||
|
@ -1255,6 +1287,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
m_commander.RegisterCommand("effect", pluginRunCommand);
|
m_commander.RegisterCommand("effect", pluginRunCommand);
|
||||||
m_commander.RegisterCommand("flip", flipCommand);
|
m_commander.RegisterCommand("flip", flipCommand);
|
||||||
m_commander.RegisterCommand("rescale", rescaleCommand);
|
m_commander.RegisterCommand("rescale", rescaleCommand);
|
||||||
|
m_commander.RegisterCommand("min", minCommand);
|
||||||
|
m_commander.RegisterCommand("max", maxCommand);
|
||||||
|
|
||||||
// Add this to our scene so scripts can call these functions
|
// Add this to our scene so scripts can call these functions
|
||||||
m_scene.RegisterModuleCommander(m_commander);
|
m_scene.RegisterModuleCommander(m_commander);
|
||||||
|
|
Loading…
Reference in New Issue