aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs45
1 files changed, 43 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index 5dbf207..5552317 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -89,6 +89,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
89// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 89// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
90 90
91 scene.AddCommand( 91 scene.AddCommand(
92 "Debug", this, "debug scene get",
93 "debug scene get",
94 "List current scene options.",
95 "If active is false then main scene update and maintenance loops are suspended.\n"
96 + "If collisions is false then collisions with other objects are turned off.\n"
97 + "If pbackup is false then periodic scene backup is turned off.\n"
98 + "If physics is false then all physics objects are non-physical.\n"
99 + "If scripting is false then no scripting operations happen.\n"
100 + "If teleport is true then some extra teleport debug information is logged.\n"
101 + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
102 HandleDebugSceneGetCommand);
103
104 scene.AddCommand(
92 "Debug", this, "debug scene set", 105 "Debug", this, "debug scene set",
93 "debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false", 106 "debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false",
94 "Turn on scene debugging options.", 107 "Turn on scene debugging options.",
@@ -99,10 +112,38 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
99 + "If scripting is false then no scripting operations happen.\n" 112 + "If scripting is false then no scripting operations happen.\n"
100 + "If teleport is true then some extra teleport debug information is logged.\n" 113 + "If teleport is true then some extra teleport debug information is logged.\n"
101 + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.", 114 + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
102 HandleDebugSceneCommand); 115 HandleDebugSceneSetCommand);
116 }
117
118 private void HandleDebugSceneGetCommand(string module, string[] args)
119 {
120 if (args.Length == 3)
121 {
122 if (MainConsole.Instance.ConsoleScene == null)
123 MainConsole.Instance.Output("Please use 'change region <regioname>' first");
124 else
125 OutputSceneDebugOptions();
126 }
127 else
128 {
129 MainConsole.Instance.Output("Usage: debug scene get");
130 }
131 }
132
133 private void OutputSceneDebugOptions()
134 {
135 ConsoleDisplayList cdl = new ConsoleDisplayList();
136 cdl.AddRow("active", m_scene.Active);
137 cdl.AddRow("pbackup", m_scene.PeriodicBackup);
138 cdl.AddRow("physics", m_scene.PhysicsEnabled);
139 cdl.AddRow("scripting", m_scene.ScriptsEnabled);
140 cdl.AddRow("teleport", m_scene.DebugTeleporting);
141 cdl.AddRow("updates", m_scene.DebugUpdates);
142
143 MainConsole.Instance.Output(cdl.ToString());
103 } 144 }
104 145
105 private void HandleDebugSceneCommand(string module, string[] args) 146 private void HandleDebugSceneSetCommand(string module, string[] args)
106 { 147 {
107 if (args.Length == 5) 148 if (args.Length == 5)
108 { 149 {