diff options
author | BlueWall | 2012-10-20 05:25:58 -0400 |
---|---|---|
committer | BlueWall | 2012-10-20 05:25:58 -0400 |
commit | 07f1d44174f5e2b4e3d5ffdec3619bb84f357af2 (patch) | |
tree | 83cc0442b2c1b89a5b3dd94cff23d5098415777e /OpenSim/Region/Application | |
parent | Merge branch 'master' into connector_plugin (diff) | |
parent | Fix: invinite loading for Viewer3 : parcelinfo request of traffic-value (impl... (diff) | |
download | opensim-SC-07f1d44174f5e2b4e3d5ffdec3619bb84f357af2.zip opensim-SC-07f1d44174f5e2b4e3d5ffdec3619bb84f357af2.tar.gz opensim-SC-07f1d44174f5e2b4e3d5ffdec3619bb84f357af2.tar.bz2 opensim-SC-07f1d44174f5e2b4e3d5ffdec3619bb84f357af2.tar.xz |
Merge branch 'master' into connector_plugin
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 72 |
2 files changed, 45 insertions, 40 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index c3c612f..b24641a 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -254,8 +254,14 @@ namespace OpenSim | |||
254 | m_console.Commands.AddCommand("Debug", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); | 254 | m_console.Commands.AddCommand("Debug", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); |
255 | 255 | ||
256 | m_console.Commands.AddCommand("Debug", false, "debug scene", | 256 | m_console.Commands.AddCommand("Debug", false, "debug scene", |
257 | "debug scene <scripting> <collisions> <physics>", | 257 | "debug scene active|collisions|physics|scripting|teleport true|false", |
258 | "Turn on scene debugging", Debug); | 258 | "Turn on scene debugging.", |
259 | "If active is false then main scene update and maintenance loops are suspended.\n" | ||
260 | + "If collisions is false then collisions with other objects are turned off.\n" | ||
261 | + "If physics is false then all physics objects are non-physical.\n" | ||
262 | + "If scripting is false then no scripting operations happen.\n" | ||
263 | + "If teleport is true then some extra teleport debug information is logged.", | ||
264 | Debug); | ||
259 | 265 | ||
260 | m_console.Commands.AddCommand("General", false, "change region", | 266 | m_console.Commands.AddCommand("General", false, "change region", |
261 | "change region <region name>", | 267 | "change region <region name>", |
@@ -930,7 +936,8 @@ namespace OpenSim | |||
930 | } | 936 | } |
931 | else | 937 | else |
932 | { | 938 | { |
933 | MainConsole.Instance.Output("Usage: debug scene scripting|collisions|physics|teleport true|false"); | 939 | MainConsole.Instance.Output( |
940 | "Usage: debug scene active|scripting|collisions|physics|teleport true|false"); | ||
934 | } | 941 | } |
935 | 942 | ||
936 | break; | 943 | break; |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f784398..4f1b439 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -223,8 +223,6 @@ namespace OpenSim | |||
223 | 223 | ||
224 | base.StartupSpecific(); | 224 | base.StartupSpecific(); |
225 | 225 | ||
226 | m_stats = StatsManager.SimExtraStats; | ||
227 | |||
228 | // Create a ModuleLoader instance | 226 | // Create a ModuleLoader instance |
229 | m_moduleLoader = new ModuleLoader(m_config.Source); | 227 | m_moduleLoader = new ModuleLoader(m_config.Source); |
230 | 228 | ||
@@ -234,51 +232,51 @@ namespace OpenSim | |||
234 | plugin.PostInitialise(); | 232 | plugin.PostInitialise(); |
235 | } | 233 | } |
236 | 234 | ||
237 | AddPluginCommands(); | 235 | if (m_console != null) |
236 | { | ||
237 | StatsManager.RegisterConsoleCommands(m_console); | ||
238 | AddPluginCommands(m_console); | ||
239 | } | ||
238 | } | 240 | } |
239 | 241 | ||
240 | protected virtual void AddPluginCommands() | 242 | protected virtual void AddPluginCommands(CommandConsole console) |
241 | { | 243 | { |
242 | // If console exists add plugin commands. | 244 | List<string> topics = GetHelpTopics(); |
243 | if (m_console != null) | ||
244 | { | ||
245 | List<string> topics = GetHelpTopics(); | ||
246 | 245 | ||
247 | foreach (string topic in topics) | 246 | foreach (string topic in topics) |
248 | { | 247 | { |
249 | string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1); | 248 | string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1); |
250 | 249 | ||
251 | // This is a hack to allow the user to enter the help command in upper or lowercase. This will go | 250 | // This is a hack to allow the user to enter the help command in upper or lowercase. This will go |
252 | // away at some point. | 251 | // away at some point. |
253 | m_console.Commands.AddCommand(capitalizedTopic, false, "help " + topic, | 252 | console.Commands.AddCommand(capitalizedTopic, false, "help " + topic, |
254 | "help " + capitalizedTopic, | 253 | "help " + capitalizedTopic, |
255 | "Get help on plugin command '" + topic + "'", | 254 | "Get help on plugin command '" + topic + "'", |
256 | HandleCommanderHelp); | 255 | HandleCommanderHelp); |
257 | m_console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, | 256 | console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, |
258 | "help " + capitalizedTopic, | 257 | "help " + capitalizedTopic, |
259 | "Get help on plugin command '" + topic + "'", | 258 | "Get help on plugin command '" + topic + "'", |
260 | HandleCommanderHelp); | 259 | HandleCommanderHelp); |
261 | 260 | ||
262 | ICommander commander = null; | 261 | ICommander commander = null; |
263 | 262 | ||
264 | Scene s = SceneManager.CurrentOrFirstScene; | 263 | Scene s = SceneManager.CurrentOrFirstScene; |
265 | 264 | ||
266 | if (s != null && s.GetCommanders() != null) | 265 | if (s != null && s.GetCommanders() != null) |
267 | { | 266 | { |
268 | if (s.GetCommanders().ContainsKey(topic)) | 267 | if (s.GetCommanders().ContainsKey(topic)) |
269 | commander = s.GetCommanders()[topic]; | 268 | commander = s.GetCommanders()[topic]; |
270 | } | 269 | } |
271 | 270 | ||
272 | if (commander == null) | 271 | if (commander == null) |
273 | continue; | 272 | continue; |
274 | 273 | ||
275 | foreach (string command in commander.Commands.Keys) | 274 | foreach (string command in commander.Commands.Keys) |
276 | { | 275 | { |
277 | m_console.Commands.AddCommand(capitalizedTopic, false, | 276 | console.Commands.AddCommand(capitalizedTopic, false, |
278 | topic + " " + command, | 277 | topic + " " + command, |
279 | topic + " " + commander.Commands[command].ShortHelp(), | 278 | topic + " " + commander.Commands[command].ShortHelp(), |
280 | String.Empty, HandleCommanderCommand); | 279 | String.Empty, HandleCommanderCommand); |
281 | } | ||
282 | } | 280 | } |
283 | } | 281 | } |
284 | } | 282 | } |