Add a "debug scene set child-repri <double>" command that allows child reprioritization distance to be changed on the fly.

This governs when child agent position changes are sent to neighbouring regions.
Corresponding config parameter is ChildReprioritizationDistance in [InterestManagement] in OpenSim.ini
For test purposes.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-07-29 00:13:29 +01:00
parent 9c804466e5
commit f6f7585ec5
4 changed files with 79 additions and 21 deletions

View File

@@ -93,28 +93,30 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
"Debug", this, "debug scene get",
"debug scene get",
"List current scene options.",
"If active is false then main scene update and maintenance loops are suspended.\n"
+ "If animations is true then extra animations debug information is logged.\n"
+ "If collisions is false then collisions with other objects are turned off.\n"
+ "If pbackup is false then periodic scene backup is turned off.\n"
+ "If physics is false then all physics objects are non-physical.\n"
+ "If scripting is false then no scripting operations happen.\n"
+ "If teleport is true then some extra teleport debug information is logged.\n"
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
"active - if false then main scene update and maintenance loops are suspended.\n"
+ "animations - if true then extra animations debug information is logged.\n"
+ "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
+ "collisions - if false then collisions with other objects are turned off.\n"
+ "pbackup - if false then periodic scene backup is turned off.\n"
+ "physics - if false then all physics objects are non-physical.\n"
+ "scripting - if false then no scripting operations happen.\n"
+ "teleport - if true then some extra teleport debug information is logged.\n"
+ "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
HandleDebugSceneGetCommand);
scene.AddCommand(
"Debug", this, "debug scene set",
"debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false",
"Turn on scene debugging options.",
"If active is false then main scene update and maintenance loops are suspended.\n"
+ "If animations is true then extra animations debug information is logged.\n"
+ "If collisions is false then collisions with other objects are turned off.\n"
+ "If pbackup is false then periodic scene backup is turned off.\n"
+ "If physics is false then all physics objects are non-physical.\n"
+ "If scripting is false then no scripting operations happen.\n"
+ "If teleport is true then some extra teleport debug information is logged.\n"
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
"active - if false then main scene update and maintenance loops are suspended.\n"
+ "animations - if true then extra animations debug information is logged.\n"
+ "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
+ "collisions - if false then collisions with other objects are turned off.\n"
+ "pbackup - if false then periodic scene backup is turned off.\n"
+ "physics - if false then all physics objects are non-physical.\n"
+ "scripting - if false then no scripting operations happen.\n"
+ "teleport - if true then some extra teleport debug information is logged.\n"
+ "updates - if true then any frame which exceeds double the maximum desired frame time is logged.",
HandleDebugSceneSetCommand);
}
@@ -138,6 +140,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
ConsoleDisplayList cdl = new ConsoleDisplayList();
cdl.AddRow("active", m_scene.Active);
cdl.AddRow("animations", m_scene.DebugAnimations);
cdl.AddRow("child-repri", m_scene.ChildReprioritizationDistance);
cdl.AddRow("pbackup", m_scene.PeriodicBackup);
cdl.AddRow("physics", m_scene.PhysicsEnabled);
cdl.AddRow("scripting", m_scene.ScriptsEnabled);
@@ -186,6 +189,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
m_scene.DebugAnimations = active;
}
if (options.ContainsKey("child-repri"))
{
double childRepriDistance;
// FIXME: This can only come from the console at the moment but might not always be true.
if (ConsoleUtil.TryParseConsoleDouble(MainConsole.Instance, options["child-repri"], out childRepriDistance))
m_scene.ChildReprioritizationDistance = childRepriDistance;
}
if (options.ContainsKey("pbackup"))
{
bool active;