aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/SceneCommands
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/SceneCommands')
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs122
1 files changed, 10 insertions, 112 deletions
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index 0927c4f..7e3bd7f 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -54,38 +54,38 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
54 private Scene m_scene; 54 private Scene m_scene;
55 55
56 public string Name { get { return "Scene Commands Module"; } } 56 public string Name { get { return "Scene Commands Module"; } }
57 57
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) 60 public void Initialise(IConfigSource source)
61 { 61 {
62// m_log.DebugFormat("[SCENE COMMANDS MODULE]: INITIALIZED MODULE"); 62// m_log.DebugFormat("[SCENE COMMANDS MODULE]: INITIALIZED MODULE");
63 } 63 }
64 64
65 public void PostInitialise() 65 public void PostInitialise()
66 { 66 {
67// m_log.DebugFormat("[SCENE COMMANDS MODULE]: POST INITIALIZED MODULE"); 67// m_log.DebugFormat("[SCENE COMMANDS MODULE]: POST INITIALIZED MODULE");
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72// m_log.DebugFormat("[SCENE COMMANDS MODULE]: CLOSED MODULE"); 72// m_log.DebugFormat("[SCENE COMMANDS MODULE]: CLOSED MODULE");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 77// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
78 78
79 m_scene = scene; 79 m_scene = scene;
80 80
81 m_scene.RegisterModuleInterface<ISceneCommandsModule>(this); 81 m_scene.RegisterModuleInterface<ISceneCommandsModule>(this);
82 } 82 }
83 83
84 public void RemoveRegion(Scene scene) 84 public void RemoveRegion(Scene scene)
85 { 85 {
86// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 86// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
87 } 87 }
88 88
89 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
90 { 90 {
91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -96,19 +96,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
96 "List current scene options.", 96 "List current scene options.",
97 "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"
98 + "animations - if true then extra animations debug information is logged.\n" 98 + "animations - if true then extra animations debug information is logged.\n"
99 + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\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"
101 + "client-pos-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"
103 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\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"
105 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
106 + "collisions - if false then collisions with other objects are turned off.\n" 99 + "collisions - if false then collisions with other objects are turned off.\n"
107 + "pbackup - if false then periodic scene backup is turned off.\n" 100 + "pbackup - if false then periodic scene backup is turned off.\n"
108 + "physics - if false then all physics objects are non-physical.\n" 101 + "physics - if false then all physics objects are non-physical.\n"
109 + "scripting - if false then no scripting operations happen.\n" 102 + "scripting - if false then no scripting operations happen.\n"
110 + "teleport - if true then some extra teleport debug information is logged.\n" 103 + "teleport - if true then some extra teleport debug information is logged.\n"
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.", 104 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
113 HandleDebugSceneGetCommand); 105 HandleDebugSceneGetCommand);
114 106
@@ -118,19 +110,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
118 "Turn on scene debugging options.", 110 "Turn on scene debugging options.",
119 "active - if false then main scene update and maintenance loops are suspended.\n" 111 "active - if false then main scene update and maintenance loops are suspended.\n"
120 + "animations - if true then extra animations debug information is logged.\n" 112 + "animations - if true then extra animations debug information is logged.\n"
121 + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\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"
123 + "client-pos-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"
125 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\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"
127 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
128 + "collisions - if false then collisions with other objects are turned off.\n" 113 + "collisions - if false then collisions with other objects are turned off.\n"
129 + "pbackup - if false then periodic scene backup is turned off.\n" 114 + "pbackup - if false then periodic scene backup is turned off.\n"
130 + "physics - if false then all physics objects are non-physical.\n" 115 + "physics - if false then all physics objects are non-physical.\n"
131 + "scripting - if false then no scripting operations happen.\n" 116 + "scripting - if false then no scripting operations happen.\n"
132 + "teleport - if true then some extra teleport debug information is logged.\n" 117 + "teleport - if true then some extra teleport debug information is logged.\n"
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.", 118 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
135 HandleDebugSceneSetCommand); 119 HandleDebugSceneSetCommand);
136 } 120 }
@@ -155,18 +139,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
155 ConsoleDisplayList cdl = new ConsoleDisplayList(); 139 ConsoleDisplayList cdl = new ConsoleDisplayList();
156 cdl.AddRow("active", m_scene.Active); 140 cdl.AddRow("active", m_scene.Active);
157 cdl.AddRow("animations", m_scene.DebugAnimations); 141 cdl.AddRow("animations", m_scene.DebugAnimations);
158 cdl.AddRow("appear-refresh", m_scene.SendPeriodicAppearanceUpdates);
159 cdl.AddRow("child-repri", m_scene.ChildReprioritizationDistance);
160 cdl.AddRow("client-pos-upd", m_scene.RootPositionUpdateTolerance);
161 cdl.AddRow("client-rot-upd", m_scene.RootRotationUpdateTolerance);
162 cdl.AddRow("client-vel-upd", m_scene.RootVelocityUpdateTolerance);
163 cdl.AddRow("root-upd-per", m_scene.RootTerseUpdatePeriod);
164 cdl.AddRow("child-upd-per", m_scene.ChildTerseUpdatePeriod);
165 cdl.AddRow("pbackup", m_scene.PeriodicBackup); 142 cdl.AddRow("pbackup", m_scene.PeriodicBackup);
166 cdl.AddRow("physics", m_scene.PhysicsEnabled); 143 cdl.AddRow("physics", m_scene.PhysicsEnabled);
167 cdl.AddRow("scripting", m_scene.ScriptsEnabled); 144 cdl.AddRow("scripting", m_scene.ScriptsEnabled);
168 cdl.AddRow("teleport", m_scene.DebugTeleporting); 145 cdl.AddRow("teleport", m_scene.DebugTeleporting);
169 cdl.AddRow("update-on-timer", m_scene.UpdateOnTimer);
170 cdl.AddRow("updates", m_scene.DebugUpdates); 146 cdl.AddRow("updates", m_scene.DebugUpdates);
171 147
172 MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name); 148 MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name);
@@ -210,69 +186,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
210 m_scene.DebugAnimations = active; 186 m_scene.DebugAnimations = active;
211 } 187 }
212 188
213 if (options.ContainsKey("appear-refresh"))
214 {
215 bool newValue;
216
217 // FIXME: This can only come from the console at the moment but might not always be true.
218 if (ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, options["appear-refresh"], out newValue))
219 m_scene.SendPeriodicAppearanceUpdates = newValue;
220 }
221
222 if (options.ContainsKey("child-repri"))
223 {
224 double newValue;
225
226 // FIXME: This can only come from the console at the moment but might not always be true.
227 if (ConsoleUtil.TryParseConsoleDouble(MainConsole.Instance, options["child-repri"], out newValue))
228 m_scene.ChildReprioritizationDistance = newValue;
229 }
230
231 if (options.ContainsKey("client-pos-upd"))
232 {
233 float newValue;
234
235 // FIXME: This can only come from the console at the moment but might not always be true.
236 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue))
237 m_scene.RootPositionUpdateTolerance = newValue;
238 }
239
240 if (options.ContainsKey("client-rot-upd"))
241 {
242 float newValue;
243
244 // FIXME: This can only come from the console at the moment but might not always be true.
245 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue))
246 m_scene.RootRotationUpdateTolerance = newValue;
247 }
248
249 if (options.ContainsKey("client-vel-upd"))
250 {
251 float newValue;
252
253 // FIXME: This can only come from the console at the moment but might not always be true.
254 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue))
255 m_scene.RootVelocityUpdateTolerance = newValue;
256 }
257
258 if (options.ContainsKey("root-upd-per"))
259 {
260 int newValue;
261
262 // FIXME: This can only come from the console at the moment but might not always be true.
263 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["root-upd-per"], out newValue))
264 m_scene.RootTerseUpdatePeriod = newValue;
265 }
266
267 if (options.ContainsKey("child-upd-per"))
268 {
269 int newValue;
270
271 // FIXME: This can only come from the console at the moment but might not always be true.
272 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["child-upd-per"], out newValue))
273 m_scene.ChildTerseUpdatePeriod = newValue;
274 }
275
276 if (options.ContainsKey("pbackup")) 189 if (options.ContainsKey("pbackup"))
277 { 190 {
278 bool active; 191 bool active;
@@ -308,21 +221,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
308 m_scene.DebugTeleporting = enableTeleportDebugging; 221 m_scene.DebugTeleporting = enableTeleportDebugging;
309 } 222 }
310 223
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
326 if (options.ContainsKey("updates")) 224 if (options.ContainsKey("updates"))
327 { 225 {
328 bool enableUpdateDebugging; 226 bool enableUpdateDebugging;
@@ -334,4 +232,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
334 } 232 }
335 } 233 }
336 } 234 }
337} \ No newline at end of file 235}