Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim

soprefactor
Justin Clark-Casey (justincc) 2010-05-21 22:17:58 +01:00
commit 6918446fcd
2 changed files with 32 additions and 17 deletions

View File

@ -5,6 +5,18 @@ using Nini.Config;
using OpenSim.Framework;
using OpenMetaverse;
/*
* Steps to add a new prioritization policy:
*
* - Add a new value to the UpdatePrioritizationSchemes enum.
* - Specify this new value in the [InterestManagement] section of your
* OpenSim.ini. The name in the config file must match the enum value name
* (although it is not case sensitive).
* - Write a new GetPriorityBy*() method in this class.
* - Add a new entry to the switch statement in GetUpdatePriority() that calls
* your method.
*/
namespace OpenSim.Region.Framework.Scenes
{
public enum UpdatePrioritizationSchemes
@ -35,7 +47,7 @@ namespace OpenSim.Region.Framework.Scenes
case UpdatePrioritizationSchemes.Distance:
return GetPriorityByDistance(client, entity);
case UpdatePrioritizationSchemes.SimpleAngularDistance:
return GetPriorityByDistance(client, entity);
return GetPriorityByDistance(client, entity); // TODO: Reimplement SimpleAngularDistance
case UpdatePrioritizationSchemes.FrontBack:
return GetPriorityByFrontBack(client, entity);
default:

View File

@ -794,6 +794,8 @@ namespace OpenSim.Region.Framework.Scenes
#region Interest Management
if (m_config != null)
{
IConfig interestConfig = m_config.Configs["InterestManagement"];
if (interestConfig != null)
{
@ -814,6 +816,7 @@ namespace OpenSim.Region.Framework.Scenes
m_rootReprioritizationDistance = interestConfig.GetDouble("RootReprioritizationDistance", 10.0);
m_childReprioritizationDistance = interestConfig.GetDouble("ChildReprioritizationDistance", 20.0);
}
}
m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme");