aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs81
1 files changed, 50 insertions, 31 deletions
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index f2595c8..0927c4f 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.Linq; 30using System.Linq;
31using System.Reflection; 31using System.Reflection;
32using System.Text; 32using System.Text;
33using System.Threading;
33using log4net; 34using log4net;
34using Mono.Addins; 35using Mono.Addins;
35using Nini.Config; 36using Nini.Config;
@@ -93,42 +94,44 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
93 "Debug", this, "debug scene get", 94 "Debug", this, "debug scene get",
94 "debug scene get", 95 "debug scene get",
95 "List current scene options.", 96 "List current scene options.",
96 "active - if false then main scene update and maintenance loops are suspended.\n" 97 "active - if false then main scene update and maintenance loops are suspended.\n"
97 + "animations - if true then extra animations debug information is logged.\n" 98 + "animations - if true then extra animations debug information is logged.\n"
98 + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\n" 99 + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\n"
99 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n" 100 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
100 + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" 101 + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
101 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" 102 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
102 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n" 103 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
103 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n" 104 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n"
104 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n" 105 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
105 + "collisions - if false then collisions with other objects are turned off.\n" 106 + "collisions - if false then collisions with other objects are turned off.\n"
106 + "pbackup - if false then periodic scene backup is turned off.\n" 107 + "pbackup - if false then periodic scene backup is turned off.\n"
107 + "physics - if false then all physics objects are non-physical.\n" 108 + "physics - if false then all physics objects are non-physical.\n"
108 + "scripting - if false then no scripting operations happen.\n" 109 + "scripting - if false then no scripting operations happen.\n"
109 + "teleport - if true then some extra teleport debug information is logged.\n" 110 + "teleport - if true then some extra teleport debug information is logged.\n"
110 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", 111 + "update-on-timer - If true then the scene is updated via a timer. If false then a thread with sleep is used.\n"
112 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
111 HandleDebugSceneGetCommand); 113 HandleDebugSceneGetCommand);
112 114
113 scene.AddCommand( 115 scene.AddCommand(
114 "Debug", this, "debug scene set", 116 "Debug", this, "debug scene set",
115 "debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false", 117 "debug scene set <param> <value>",
116 "Turn on scene debugging options.", 118 "Turn on scene debugging options.",
117 "active - if false then main scene update and maintenance loops are suspended.\n" 119 "active - if false then main scene update and maintenance loops are suspended.\n"
118 + "animations - if true then extra animations debug information is logged.\n" 120 + "animations - if true then extra animations debug information is logged.\n"
119 + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\n" 121 + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\n"
120 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n" 122 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
121 + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" 123 + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
122 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" 124 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
123 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n" 125 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
124 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n" 126 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n"
125 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n" 127 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
126 + "collisions - if false then collisions with other objects are turned off.\n" 128 + "collisions - if false then collisions with other objects are turned off.\n"
127 + "pbackup - if false then periodic scene backup is turned off.\n" 129 + "pbackup - if false then periodic scene backup is turned off.\n"
128 + "physics - if false then all physics objects are non-physical.\n" 130 + "physics - if false then all physics objects are non-physical.\n"
129 + "scripting - if false then no scripting operations happen.\n" 131 + "scripting - if false then no scripting operations happen.\n"
130 + "teleport - if true then some extra teleport debug information is logged.\n" 132 + "teleport - if true then some extra teleport debug information is logged.\n"
131 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", 133 + "update-on-timer - If true then the scene is updated via a timer. If false then a thread with sleep is used.\n"
134 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
132 HandleDebugSceneSetCommand); 135 HandleDebugSceneSetCommand);
133 } 136 }
134 137
@@ -163,6 +166,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
163 cdl.AddRow("physics", m_scene.PhysicsEnabled); 166 cdl.AddRow("physics", m_scene.PhysicsEnabled);
164 cdl.AddRow("scripting", m_scene.ScriptsEnabled); 167 cdl.AddRow("scripting", m_scene.ScriptsEnabled);
165 cdl.AddRow("teleport", m_scene.DebugTeleporting); 168 cdl.AddRow("teleport", m_scene.DebugTeleporting);
169 cdl.AddRow("update-on-timer", m_scene.UpdateOnTimer);
166 cdl.AddRow("updates", m_scene.DebugUpdates); 170 cdl.AddRow("updates", m_scene.DebugUpdates);
167 171
168 MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name); 172 MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name);
@@ -304,6 +308,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
304 m_scene.DebugTeleporting = enableTeleportDebugging; 308 m_scene.DebugTeleporting = enableTeleportDebugging;
305 } 309 }
306 310
311 if (options.ContainsKey("update-on-timer"))
312 {
313 bool enableUpdateOnTimer;
314 if (bool.TryParse(options["update-on-timer"], out enableUpdateOnTimer))
315 {
316 m_scene.UpdateOnTimer = enableUpdateOnTimer;
317 m_scene.Active = false;
318
319 while (m_scene.IsRunning)
320 Thread.Sleep(20);
321
322 m_scene.Active = true;
323 }
324 }
325
307 if (options.ContainsKey("updates")) 326 if (options.ContainsKey("updates"))
308 { 327 {
309 bool enableUpdateDebugging; 328 bool enableUpdateDebugging;