Add "debug scene get" console command to list current scene options
parent
c6bb0d9662
commit
69104f38f9
|
@ -88,6 +88,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
|||
{
|
||||
// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
|
||||
|
||||
scene.AddCommand(
|
||||
"Debug", this, "debug scene get",
|
||||
"debug scene get",
|
||||
"List current scene options.",
|
||||
"If active is false then main scene update and maintenance loops are suspended.\n"
|
||||
+ "If collisions is false then collisions with other objects are turned off.\n"
|
||||
+ "If pbackup is false then periodic scene backup is turned off.\n"
|
||||
+ "If physics is false then all physics objects are non-physical.\n"
|
||||
+ "If scripting is false then no scripting operations happen.\n"
|
||||
+ "If teleport is true then some extra teleport debug information is logged.\n"
|
||||
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
|
||||
HandleDebugSceneGetCommand);
|
||||
|
||||
scene.AddCommand(
|
||||
"Debug", this, "debug scene set",
|
||||
"debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false",
|
||||
|
@ -99,10 +112,38 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
|||
+ "If scripting is false then no scripting operations happen.\n"
|
||||
+ "If teleport is true then some extra teleport debug information is logged.\n"
|
||||
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
|
||||
HandleDebugSceneCommand);
|
||||
HandleDebugSceneSetCommand);
|
||||
}
|
||||
|
||||
private void HandleDebugSceneCommand(string module, string[] args)
|
||||
private void HandleDebugSceneGetCommand(string module, string[] args)
|
||||
{
|
||||
if (args.Length == 3)
|
||||
{
|
||||
if (MainConsole.Instance.ConsoleScene == null)
|
||||
MainConsole.Instance.Output("Please use 'change region <regioname>' first");
|
||||
else
|
||||
OutputSceneDebugOptions();
|
||||
}
|
||||
else
|
||||
{
|
||||
MainConsole.Instance.Output("Usage: debug scene get");
|
||||
}
|
||||
}
|
||||
|
||||
private void OutputSceneDebugOptions()
|
||||
{
|
||||
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
||||
cdl.AddRow("active", m_scene.Active);
|
||||
cdl.AddRow("pbackup", m_scene.PeriodicBackup);
|
||||
cdl.AddRow("physics", m_scene.PhysicsEnabled);
|
||||
cdl.AddRow("scripting", m_scene.ScriptsEnabled);
|
||||
cdl.AddRow("teleport", m_scene.DebugTeleporting);
|
||||
cdl.AddRow("updates", m_scene.DebugUpdates);
|
||||
|
||||
MainConsole.Instance.Output(cdl.ToString());
|
||||
}
|
||||
|
||||
private void HandleDebugSceneSetCommand(string module, string[] args)
|
||||
{
|
||||
if (args.Length == 5)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue