diff options
author | Justin Clark-Casey (justincc) | 2013-01-10 23:56:11 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-10 23:56:11 +0000 |
commit | f3a2bbbd93bd670f54add28fab09c824aa7f9c97 (patch) | |
tree | 3f4bcd1cf45e6811a832b122ebf2e02ac093e81f /OpenSim/Region | |
parent | Move scene debug commands into separate module. Command changes from "debug ... (diff) | |
download | opensim-SC_OLD-f3a2bbbd93bd670f54add28fab09c824aa7f9c97.zip opensim-SC_OLD-f3a2bbbd93bd670f54add28fab09c824aa7f9c97.tar.gz opensim-SC_OLD-f3a2bbbd93bd670f54add28fab09c824aa7f9c97.tar.bz2 opensim-SC_OLD-f3a2bbbd93bd670f54add28fab09c824aa7f9c97.tar.xz |
Add "debug scene get" console command to list current scene options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs | 45 |
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 | { |