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.bullet-2.82
parent
9c804466e5
commit
f6f7585ec5
|
@ -156,7 +156,7 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert a console integer to an int, automatically complaining if a console is given.
|
/// Convert a console input to a bool, automatically complaining if a console is given.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name='console'>Can be null if no console is available.</param>
|
/// <param name='console'>Can be null if no console is available.</param>
|
||||||
/// <param name='rawConsoleVector'>/param>
|
/// <param name='rawConsoleVector'>/param>
|
||||||
|
@ -176,7 +176,7 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert a console integer to an int, automatically complaining if a console is given.
|
/// Convert a console input to an int, automatically complaining if a console is given.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name='console'>Can be null if no console is available.</param>
|
/// <param name='console'>Can be null if no console is available.</param>
|
||||||
/// <param name='rawConsoleInt'>/param>
|
/// <param name='rawConsoleInt'>/param>
|
||||||
|
@ -195,6 +195,46 @@ namespace OpenSim.Framework.Console
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert a console input to a float, automatically complaining if a console is given.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name='console'>Can be null if no console is available.</param>
|
||||||
|
/// <param name='rawConsoleInput'>/param>
|
||||||
|
/// <param name='i'></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static bool TryParseConsoleFloat(ICommandConsole console, string rawConsoleInput, out float i)
|
||||||
|
{
|
||||||
|
if (!float.TryParse(rawConsoleInput, out i))
|
||||||
|
{
|
||||||
|
if (console != null)
|
||||||
|
console.OutputFormat("ERROR: {0} is not a valid float", rawConsoleInput);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert a console input to a double, automatically complaining if a console is given.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name='console'>Can be null if no console is available.</param>
|
||||||
|
/// <param name='rawConsoleInput'>/param>
|
||||||
|
/// <param name='i'></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static bool TryParseConsoleDouble(ICommandConsole console, string rawConsoleInput, out double i)
|
||||||
|
{
|
||||||
|
if (!double.TryParse(rawConsoleInput, out i))
|
||||||
|
{
|
||||||
|
if (console != null)
|
||||||
|
console.OutputFormat("ERROR: {0} is not a valid double", rawConsoleInput);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert a console integer to a natural int, automatically complaining if a console is given.
|
/// Convert a console integer to a natural int, automatically complaining if a console is given.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -413,7 +413,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private bool m_reprioritizationEnabled = true;
|
private bool m_reprioritizationEnabled = true;
|
||||||
private double m_reprioritizationInterval = 5000.0;
|
private double m_reprioritizationInterval = 5000.0;
|
||||||
private double m_rootReprioritizationDistance = 10.0;
|
private double m_rootReprioritizationDistance = 10.0;
|
||||||
private double m_childReprioritizationDistance = 20.0;
|
|
||||||
|
|
||||||
private Timer m_mapGenerationTimer = new Timer();
|
private Timer m_mapGenerationTimer = new Timer();
|
||||||
private bool m_generateMaptiles;
|
private bool m_generateMaptiles;
|
||||||
|
@ -650,7 +649,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } }
|
public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } }
|
||||||
public double ReprioritizationInterval { get { return m_reprioritizationInterval; } }
|
public double ReprioritizationInterval { get { return m_reprioritizationInterval; } }
|
||||||
public double RootReprioritizationDistance { get { return m_rootReprioritizationDistance; } }
|
public double RootReprioritizationDistance { get { return m_rootReprioritizationDistance; } }
|
||||||
public double ChildReprioritizationDistance { get { return m_childReprioritizationDistance; } }
|
public double ChildReprioritizationDistance { get; set; }
|
||||||
|
|
||||||
public AgentCircuitManager AuthenticateHandler
|
public AgentCircuitManager AuthenticateHandler
|
||||||
{
|
{
|
||||||
|
@ -1002,7 +1001,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_reprioritizationEnabled = interestConfig.GetBoolean("ReprioritizationEnabled", true);
|
m_reprioritizationEnabled = interestConfig.GetBoolean("ReprioritizationEnabled", true);
|
||||||
m_reprioritizationInterval = interestConfig.GetDouble("ReprioritizationInterval", 5000.0);
|
m_reprioritizationInterval = interestConfig.GetDouble("ReprioritizationInterval", 5000.0);
|
||||||
m_rootReprioritizationDistance = interestConfig.GetDouble("RootReprioritizationDistance", 10.0);
|
m_rootReprioritizationDistance = interestConfig.GetDouble("RootReprioritizationDistance", 10.0);
|
||||||
m_childReprioritizationDistance = interestConfig.GetDouble("ChildReprioritizationDistance", 20.0);
|
ChildReprioritizationDistance
|
||||||
|
= interestConfig.GetDouble("ChildReprioritizationDistance", ChildReprioritizationDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[SCENE]: Using the {0} prioritization scheme", m_priorityScheme);
|
m_log.DebugFormat("[SCENE]: Using the {0} prioritization scheme", m_priorityScheme);
|
||||||
|
@ -1023,6 +1023,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
PeriodicBackup = true;
|
PeriodicBackup = true;
|
||||||
UseBackup = true;
|
UseBackup = true;
|
||||||
|
|
||||||
|
ChildReprioritizationDistance = 20.0;
|
||||||
|
|
||||||
m_eventManager = new EventManager();
|
m_eventManager = new EventManager();
|
||||||
|
|
||||||
m_permissions = new ScenePermissions(this);
|
m_permissions = new ScenePermissions(this);
|
||||||
|
|
|
@ -150,6 +150,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence)
|
public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE COMMUNICATION SERVICE]: Sending child agent position updates for {0} in {1}",
|
||||||
|
// presence.Name, m_scene.Name);
|
||||||
|
|
||||||
// This assumes that we know what our neighbors are.
|
// This assumes that we know what our neighbors are.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,28 +93,30 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
||||||
"Debug", this, "debug scene get",
|
"Debug", this, "debug scene get",
|
||||||
"debug scene get",
|
"debug scene get",
|
||||||
"List current scene options.",
|
"List current scene options.",
|
||||||
"If active is false then main scene update and maintenance loops are suspended.\n"
|
"active - if false then main scene update and maintenance loops are suspended.\n"
|
||||||
+ "If animations is true then extra animations debug information is logged.\n"
|
+ "animations - if true then extra animations debug information is logged.\n"
|
||||||
+ "If collisions is false then collisions with other objects are turned off.\n"
|
+ "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
|
||||||
+ "If pbackup is false then periodic scene backup is turned off.\n"
|
+ "collisions - if false then collisions with other objects are turned off.\n"
|
||||||
+ "If physics is false then all physics objects are non-physical.\n"
|
+ "pbackup - if false then periodic scene backup is turned off.\n"
|
||||||
+ "If scripting is false then no scripting operations happen.\n"
|
+ "physics - if false then all physics objects are non-physical.\n"
|
||||||
+ "If teleport is true then some extra teleport debug information is logged.\n"
|
+ "scripting - if false then no scripting operations happen.\n"
|
||||||
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
|
+ "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);
|
HandleDebugSceneGetCommand);
|
||||||
|
|
||||||
scene.AddCommand(
|
scene.AddCommand(
|
||||||
"Debug", this, "debug scene set",
|
"Debug", this, "debug scene set",
|
||||||
"debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false",
|
"debug scene set active|collisions|pbackup|physics|scripting|teleport|updates true|false",
|
||||||
"Turn on scene debugging options.",
|
"Turn on scene debugging options.",
|
||||||
"If active is false then main scene update and maintenance loops are suspended.\n"
|
"active - if false then main scene update and maintenance loops are suspended.\n"
|
||||||
+ "If animations is true then extra animations debug information is logged.\n"
|
+ "animations - if true then extra animations debug information is logged.\n"
|
||||||
+ "If collisions is false then collisions with other objects are turned off.\n"
|
+ "child-repri - how far an avatar must move in meters before we update the position of its child agents in neighbouring regions.\n"
|
||||||
+ "If pbackup is false then periodic scene backup is turned off.\n"
|
+ "collisions - if false then collisions with other objects are turned off.\n"
|
||||||
+ "If physics is false then all physics objects are non-physical.\n"
|
+ "pbackup - if false then periodic scene backup is turned off.\n"
|
||||||
+ "If scripting is false then no scripting operations happen.\n"
|
+ "physics - if false then all physics objects are non-physical.\n"
|
||||||
+ "If teleport is true then some extra teleport debug information is logged.\n"
|
+ "scripting - if false then no scripting operations happen.\n"
|
||||||
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
|
+ "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);
|
HandleDebugSceneSetCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,6 +140,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
||||||
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
||||||
cdl.AddRow("active", m_scene.Active);
|
cdl.AddRow("active", m_scene.Active);
|
||||||
cdl.AddRow("animations", m_scene.DebugAnimations);
|
cdl.AddRow("animations", m_scene.DebugAnimations);
|
||||||
|
cdl.AddRow("child-repri", m_scene.ChildReprioritizationDistance);
|
||||||
cdl.AddRow("pbackup", m_scene.PeriodicBackup);
|
cdl.AddRow("pbackup", m_scene.PeriodicBackup);
|
||||||
cdl.AddRow("physics", m_scene.PhysicsEnabled);
|
cdl.AddRow("physics", m_scene.PhysicsEnabled);
|
||||||
cdl.AddRow("scripting", m_scene.ScriptsEnabled);
|
cdl.AddRow("scripting", m_scene.ScriptsEnabled);
|
||||||
|
@ -186,6 +189,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
||||||
m_scene.DebugAnimations = active;
|
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"))
|
if (options.ContainsKey("pbackup"))
|
||||||
{
|
{
|
||||||
bool active;
|
bool active;
|
||||||
|
|
Loading…
Reference in New Issue