From 01a27e8c7118a09ae959c9d00832b549831169ae Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 19 Dec 2015 17:39:42 +0000 Subject: [PATCH] establish a minimun for ReprioritizationDistance --- OpenSim/Region/Framework/Scenes/Scene.cs | 22 ++++++++++++------- .../SceneCommands/SceneCommandsModule.cs | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5c5e4b3bd1..1ccba4b73f 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -801,9 +801,10 @@ namespace OpenSim.Region.Framework.Scenes public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get; set; } public bool IsReprioritizationEnabled { get; set; } - public double ReprioritizationInterval { get; set; } - public double RootReprioritizationDistance { get; set; } - public double ChildReprioritizationDistance { get; set; } + public float ReprioritizationInterval { get; set; } + public float RootReprioritizationDistance { get; set; } + public float ChildReprioritizationDistance { get; set; } + private float m_minReprioritizationDistance = 32f; public AgentCircuitManager AuthenticateHandler { @@ -1181,11 +1182,16 @@ namespace OpenSim.Region.Framework.Scenes IsReprioritizationEnabled = interestConfig.GetBoolean("ReprioritizationEnabled", IsReprioritizationEnabled); ReprioritizationInterval - = interestConfig.GetDouble("ReprioritizationInterval", ReprioritizationInterval); + = interestConfig.GetFloat("ReprioritizationInterval", ReprioritizationInterval); RootReprioritizationDistance - = interestConfig.GetDouble("RootReprioritizationDistance", RootReprioritizationDistance); + = interestConfig.GetFloat("RootReprioritizationDistance", RootReprioritizationDistance); ChildReprioritizationDistance - = interestConfig.GetDouble("ChildReprioritizationDistance", ChildReprioritizationDistance); + = interestConfig.GetFloat("ChildReprioritizationDistance", ChildReprioritizationDistance); + + if(RootReprioritizationDistance < m_minReprioritizationDistance) + RootReprioritizationDistance = m_minReprioritizationDistance; + if(ChildReprioritizationDistance < m_minReprioritizationDistance) + ChildReprioritizationDistance = m_minReprioritizationDistance; RootTerseUpdatePeriod = interestConfig.GetInt("RootTerseUpdatePeriod", RootTerseUpdatePeriod); ChildTerseUpdatePeriod = interestConfig.GetInt("ChildTerseUpdatePeriod", ChildTerseUpdatePeriod); @@ -1244,8 +1250,8 @@ namespace OpenSim.Region.Framework.Scenes RootRotationUpdateTolerance = 0.1f; RootVelocityUpdateTolerance = 0.001f; RootPositionUpdateTolerance = 0.05f; - RootReprioritizationDistance = 10.0; - ChildReprioritizationDistance = 20.0; + RootReprioritizationDistance = m_minReprioritizationDistance; + ChildReprioritizationDistance = m_minReprioritizationDistance; m_eventManager = new EventManager(); diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs index 1102aca7cd..db5c7eb8f4 100644 --- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs +++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs @@ -225,7 +225,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments // 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 newValue)) - m_scene.ChildReprioritizationDistance = newValue; + m_scene.ChildReprioritizationDistance = (float)newValue; } if (options.ContainsKey("client-pos-upd"))