aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-07-29 03:13:10 +0100
committerJustin Clark-Casey (justincc)2014-07-29 03:13:10 +0100
commitf54fccba1e436c12e55da9dfa5ca089440783e16 (patch)
treed49119dd8465109126c2f6add0642fc3e036c58d /OpenSim/Region/OptionalModules
parentAllow the "debug scene set physics false|true" command to work when bulletsim... (diff)
downloadopensim-SC_OLD-f54fccba1e436c12e55da9dfa5ca089440783e16.zip
opensim-SC_OLD-f54fccba1e436c12e55da9dfa5ca089440783e16.tar.gz
opensim-SC_OLD-f54fccba1e436c12e55da9dfa5ca089440783e16.tar.bz2
opensim-SC_OLD-f54fccba1e436c12e55da9dfa5ca089440783e16.tar.xz
Make it possible to change avatar position update, rotation and velocity tolerances on the fly.
This is done via "debug scene set client-pos-upd, client-rot-upd, client-vel-upd". For testing purposes.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs78
1 files changed, 57 insertions, 21 deletions
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index 51aad6f..90f8cb4 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -93,30 +93,36 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
93 "Debug", this, "debug scene get", 93 "Debug", this, "debug scene get",
94 "debug scene get", 94 "debug scene get",
95 "List current scene options.", 95 "List current scene options.",
96 "active - if false then main scene update and maintenance loops are suspended.\n" 96 "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" 97 + "animations - if true then extra animations debug information is logged.\n"
98 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n" 98 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
99 + "collisions - if false then collisions with other objects are turned off.\n" 99 + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
100 + "pbackup - if false then periodic scene backup is turned off.\n" 100 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
101 + "physics - if false then all physics objects are non-physical.\n" 101 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
102 + "scripting - if false then no scripting operations happen.\n" 102 + "collisions - if false then collisions with other objects are turned off.\n"
103 + "teleport - if true then some extra teleport debug information is logged.\n" 103 + "pbackup - if false then periodic scene backup is turned off.\n"
104 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", 104 + "physics - if false then all physics objects are non-physical.\n"
105 + "scripting - if false then no scripting operations happen.\n"
106 + "teleport - if true then some extra teleport debug information is logged.\n"
107 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
105 HandleDebugSceneGetCommand); 108 HandleDebugSceneGetCommand);
106 109
107 scene.AddCommand( 110 scene.AddCommand(
108 "Debug", this, "debug scene set", 111 "Debug", this, "debug scene set",
109 "debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false", 112 "debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false",
110 "Turn on scene debugging options.", 113 "Turn on scene debugging options.",
111 "active - if false then main scene update and maintenance loops are suspended.\n" 114 "active - if false then main scene update and maintenance loops are suspended.\n"
112 + "animations - if true then extra animations debug information is logged.\n" 115 + "animations - if true then extra animations debug information is logged.\n"
113 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n" 116 + "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
114 + "collisions - if false then collisions with other objects are turned off.\n" 117 + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
115 + "pbackup - if false then periodic scene backup is turned off.\n" 118 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
116 + "physics - if false then all physics objects are non-physical.\n" 119 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
117 + "scripting - if false then no scripting operations happen.\n" 120 + "collisions - if false then collisions with other objects are turned off.\n"
118 + "teleport - if true then some extra teleport debug information is logged.\n" 121 + "pbackup - if false then periodic scene backup is turned off.\n"
119 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", 122 + "physics - if false then all physics objects are non-physical.\n"
123 + "scripting - if false then no scripting operations happen.\n"
124 + "teleport - if true then some extra teleport debug information is logged.\n"
125 + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
120 HandleDebugSceneSetCommand); 126 HandleDebugSceneSetCommand);
121 } 127 }
122 128
@@ -141,6 +147,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
141 cdl.AddRow("active", m_scene.Active); 147 cdl.AddRow("active", m_scene.Active);
142 cdl.AddRow("animations", m_scene.DebugAnimations); 148 cdl.AddRow("animations", m_scene.DebugAnimations);
143 cdl.AddRow("child-repri", m_scene.ChildReprioritizationDistance); 149 cdl.AddRow("child-repri", m_scene.ChildReprioritizationDistance);
150 cdl.AddRow("client-pos-upd", m_scene.ClientPositionUpdateTolerance);
151 cdl.AddRow("client-rot-upd", m_scene.ClientRotationUpdateTolerance);
152 cdl.AddRow("client-vel-upd", m_scene.ClientVelocityUpdateTolerance);
144 cdl.AddRow("pbackup", m_scene.PeriodicBackup); 153 cdl.AddRow("pbackup", m_scene.PeriodicBackup);
145 cdl.AddRow("physics", m_scene.PhysicsEnabled); 154 cdl.AddRow("physics", m_scene.PhysicsEnabled);
146 cdl.AddRow("scripting", m_scene.ScriptsEnabled); 155 cdl.AddRow("scripting", m_scene.ScriptsEnabled);
@@ -190,11 +199,38 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
190 199
191 if (options.ContainsKey("child-repri")) 200 if (options.ContainsKey("child-repri"))
192 { 201 {
193 double childRepriDistance; 202 double newValue;
194 203
195 // FIXME: This can only come from the console at the moment but might not always be true. 204 // FIXME: This can only come from the console at the moment but might not always be true.
196 if (ConsoleUtil.TryParseConsoleDouble(MainConsole.Instance, options["child-repri"], out childRepriDistance)) 205 if (ConsoleUtil.TryParseConsoleDouble(MainConsole.Instance, options["child-repri"], out newValue))
197 m_scene.ChildReprioritizationDistance = childRepriDistance; 206 m_scene.ChildReprioritizationDistance = newValue;
207 }
208
209 if (options.ContainsKey("client-pos-upd"))
210 {
211 float newValue;
212
213 // FIXME: This can only come from the console at the moment but might not always be true.
214 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue))
215 m_scene.ClientPositionUpdateTolerance = newValue;
216 }
217
218 if (options.ContainsKey("client-rot-upd"))
219 {
220 float newValue;
221
222 // FIXME: This can only come from the console at the moment but might not always be true.
223 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue))
224 m_scene.ClientRotationUpdateTolerance = newValue;
225 }
226
227 if (options.ContainsKey("client-vel-upd"))
228 {
229 float newValue;
230
231 // FIXME: This can only come from the console at the moment but might not always be true.
232 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue))
233 m_scene.ClientVelocityUpdateTolerance = newValue;
198 } 234 }
199 235
200 if (options.ContainsKey("pbackup")) 236 if (options.ContainsKey("pbackup"))