Constrain 'terrain modify' to selected Region

Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
fsassets
Dev Random 2015-05-09 15:26:34 -04:00 committed by Michael Cerquoni
parent adf0f49a69
commit f20728fc86
1 changed files with 17 additions and 8 deletions

View File

@ -1676,10 +1676,16 @@ namespace OpenSim.Region.CoreModules.World.Terrain
public void ModifyCommand(string module, string[] cmd)
{
string result;
if (cmd.Length > 2)
Scene scene = SceneManager.Instance.CurrentScene;
if ((scene != null) && (scene != m_scene))
{
result = String.Empty;
}
else if (cmd.Length > 2)
{
string operationType = cmd[2];
ITerrainModifier operation;
if (!m_modifyOperations.TryGetValue(operationType, out operation))
{
@ -1704,7 +1710,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{
result = "Usage: <operation-name> <arg1> <arg2>...";
}
MainConsole.Instance.Output(result);
if (result != String.Empty)
{
MainConsole.Instance.Output(result);
}
}
#endregion