From 93ef65c69055157e0b7d51e544abe5a1035f40f0 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Fri, 21 May 2010 13:55:36 -0700
Subject: * Moving all of the prioritization/reprioritization code into a new
file Prioritizer.cs * Simplified the interest management code to make it
easier to add new policies. Prioritization and reprioritization share code
paths now * Improved the distance and front back policies to always give your
avatar the highest priority
---
.../Region/ClientStack/LindenUDP/LLClientView.cs | 46 +++-----
.../Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +-
OpenSim/Region/Framework/Scenes/EntityBase.cs | 3 +-
OpenSim/Region/Framework/Scenes/Prioritizer.cs | 122 +++++++++++++++++++++
OpenSim/Region/Framework/Scenes/Scene.cs | 96 ++++++++--------
.../Region/Framework/Scenes/SceneObjectGroup.cs | 101 +----------------
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 118 +-------------------
.../Server/IRCClientView.cs | 2 +-
.../Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +-
9 files changed, 193 insertions(+), 299 deletions(-)
create mode 100644 OpenSim/Region/Framework/Scenes/Prioritizer.cs
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index c8a542b..9eb35fa 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -50,18 +50,6 @@ using Nini.Config;
namespace OpenSim.Region.ClientStack.LindenUDP
{
- public class EntityUpdate
- {
- public ISceneEntity Entity;
- public PrimUpdateFlags Flags;
-
- public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags)
- {
- Entity = entity;
- Flags = flags;
- }
- }
-
public delegate bool PacketMethod(IClientAPI simClient, Packet packet);
///
@@ -325,6 +313,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private int m_cachedTextureSerial;
private PriorityQueue m_entityUpdates;
+ private Prioritizer m_prioritizer;
///
/// List used in construction of data blocks for an object update packet. This is to stop us having to
@@ -462,6 +451,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_propertiesPacketTimer = new Timer(100);
m_propertiesPacketTimer.Elapsed += ProcessObjectPropertiesPacket;
+ m_prioritizer = new Prioritizer(m_scene);
+
RegisterLocalPacketHandlers();
}
@@ -3457,14 +3448,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{
- double priority;
-
- if (entity is SceneObjectPart)
- priority = ((SceneObjectPart)entity).ParentGroup.GetUpdatePriority(this);
- else if (entity is ScenePresence)
- priority = ((ScenePresence)entity).GetUpdatePriority(this);
- else
- priority = 0.0d;
+ double priority = m_prioritizer.GetUpdatePriority(this, entity);
lock (m_entityUpdates.SyncRoot)
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId);
@@ -3613,19 +3597,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Packet Sending
}
- public void ReprioritizeUpdates(UpdatePriorityHandler handler)
+ public void ReprioritizeUpdates()
{
//m_log.Debug("[CLIENT]: Reprioritizing prim updates for " + m_firstName + " " + m_lastName);
- PriorityQueue.UpdatePriorityHandler update_priority_handler =
- delegate(ref double priority, uint local_id)
- {
- priority = handler(new UpdatePriorityData(priority, local_id));
- return priority != double.NaN;
- };
-
lock (m_entityUpdates.SyncRoot)
- m_entityUpdates.Reprioritize(update_priority_handler);
+ m_entityUpdates.Reprioritize(UpdatePriorityHandler);
+ }
+
+ private bool UpdatePriorityHandler(ref double priority, uint localID)
+ {
+ EntityBase entity;
+ if (m_scene.Entities.TryGetValue(localID, out entity))
+ {
+ priority = m_prioritizer.GetUpdatePriority(this, entity);
+ }
+
+ return priority != double.NaN;
}
public void FlushPrimUpdates()
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index aac47d1..967438f 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -548,7 +548,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
- public void ReprioritizeUpdates(UpdatePriorityHandler handler)
+ public void ReprioritizeUpdates()
{
}
diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs
index 1c76c54..4e25c46 100644
--- a/OpenSim/Region/Framework/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs
@@ -28,11 +28,12 @@
using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
+using OpenSim.Framework;
using OpenMetaverse;
namespace OpenSim.Region.Framework.Scenes
{
- public abstract class EntityBase
+ public abstract class EntityBase : ISceneEntity
{
///
/// The scene to which this entity belongs
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
new file mode 100644
index 0000000..af25014
--- /dev/null
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+using log4net;
+using Nini.Config;
+using OpenSim.Framework;
+using OpenMetaverse;
+
+namespace OpenSim.Region.Framework.Scenes
+{
+ public enum UpdatePrioritizationSchemes
+ {
+ Time = 0,
+ Distance = 1,
+ SimpleAngularDistance = 2,
+ FrontBack = 3,
+ }
+
+ public class Prioritizer
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+
+ private Scene m_scene;
+
+ public Prioritizer(Scene scene)
+ {
+ m_scene = scene;
+ }
+
+ public double GetUpdatePriority(IClientAPI client, ISceneEntity entity)
+ {
+ switch (m_scene.UpdatePrioritizationScheme)
+ {
+ case UpdatePrioritizationSchemes.Time:
+ return GetPriorityByTime();
+ case UpdatePrioritizationSchemes.Distance:
+ return GetPriorityByDistance(client, entity);
+ case UpdatePrioritizationSchemes.SimpleAngularDistance:
+ return GetPriorityByDistance(client, entity);
+ case UpdatePrioritizationSchemes.FrontBack:
+ return GetPriorityByFrontBack(client, entity);
+ default:
+ throw new InvalidOperationException("UpdatePrioritizationScheme not defined.");
+ }
+ }
+
+ private double GetPriorityByTime()
+ {
+ return DateTime.UtcNow.ToOADate();
+ }
+
+ private double GetPriorityByDistance(IClientAPI client, ISceneEntity entity)
+ {
+ ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
+ if (presence != null)
+ {
+ // If this is an update for our own avatar give it the highest priority
+ if (presence == entity)
+ return 0.0;
+
+ // Use the camera position for local agents and avatar position for remote agents
+ Vector3 presencePos = (presence.IsChildAgent) ?
+ presence.AbsolutePosition :
+ presence.CameraPosition;
+
+ // Use group position for child prims
+ Vector3 entityPos;
+ if (entity is SceneObjectPart)
+ entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
+ else
+ entityPos = entity.AbsolutePosition;
+
+ return Vector3.DistanceSquared(presencePos, entityPos);
+ }
+
+ return double.NaN;
+ }
+
+ private double GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity)
+ {
+ ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
+ if (presence != null)
+ {
+ // If this is an update for our own avatar give it the highest priority
+ if (presence == entity)
+ return 0.0;
+
+ // Use group position for child prims
+ Vector3 entityPos = entity.AbsolutePosition;
+ if (entity is SceneObjectPart)
+ entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
+ else
+ entityPos = entity.AbsolutePosition;
+
+ if (!presence.IsChildAgent)
+ {
+ // Root agent. Use distance from camera and a priority decrease for objects behind us
+ Vector3 camPosition = presence.CameraPosition;
+ Vector3 camAtAxis = presence.CameraAtAxis;
+
+ // Distance
+ double priority = Vector3.DistanceSquared(camPosition, entityPos);
+
+ // Plane equation
+ float d = -Vector3.Dot(camPosition, camAtAxis);
+ float p = Vector3.Dot(camAtAxis, entityPos) + d;
+ if (p < 0.0f) priority *= 2.0;
+
+ return priority;
+ }
+ else
+ {
+ // Child agent. Use the normal distance method
+ Vector3 presencePos = presence.AbsolutePosition;
+
+ return Vector3.DistanceSquared(presencePos, entityPos);
+ }
+ }
+
+ return double.NaN;
+ }
+ }
+}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index de8ecc2..f35dffc 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -58,13 +58,6 @@ namespace OpenSim.Region.Framework.Scenes
public partial class Scene : SceneBase
{
- public enum UpdatePrioritizationSchemes {
- Time = 0,
- Distance = 1,
- SimpleAngularDistance = 2,
- FrontBack = 3,
- }
-
public delegate void SynchronizeSceneHandler(Scene scene);
public SynchronizeSceneHandler SynchronizeScene = null;
@@ -388,12 +381,6 @@ namespace OpenSim.Region.Framework.Scenes
private int m_lastUpdate;
private bool m_firstHeartbeat = true;
- private UpdatePrioritizationSchemes m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time;
- private bool m_reprioritization_enabled = true;
- private double m_reprioritization_interval = 5000.0;
- private double m_root_reprioritization_distance = 10.0;
- private double m_child_reprioritization_distance = 20.0;
-
private object m_deleting_scene_object = new object();
// the minimum time that must elapse before a changed object will be considered for persisted
@@ -401,15 +388,21 @@ namespace OpenSim.Region.Framework.Scenes
// the maximum time that must elapse before a changed object will be considered for persisted
public long m_persistAfter = DEFAULT_MAX_TIME_FOR_PERSISTENCE * 10000000L;
+ private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
+ private bool m_reprioritizationEnabled = true;
+ private double m_reprioritizationInterval = 5000.0;
+ private double m_rootReprioritizationDistance = 10.0;
+ private double m_childReprioritizationDistance = 20.0;
+
#endregion
#region Properties
- public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return this.m_update_prioritization_scheme; } }
- public bool IsReprioritizationEnabled { get { return m_reprioritization_enabled; } }
- public double ReprioritizationInterval { get { return m_reprioritization_interval; } }
- public double RootReprioritizationDistance { get { return m_root_reprioritization_distance; } }
- public double ChildReprioritizationDistance { get { return m_child_reprioritization_distance; } }
+ public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } }
+ public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } }
+ public double ReprioritizationInterval { get { return m_reprioritizationInterval; } }
+ public double RootReprioritizationDistance { get { return m_rootReprioritizationDistance; } }
+ public double ChildReprioritizationDistance { get { return m_childReprioritizationDistance; } }
public AgentCircuitManager AuthenticateHandler
{
@@ -611,6 +604,8 @@ namespace OpenSim.Region.Framework.Scenes
m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
m_asyncSceneObjectDeleter.Enabled = true;
+ #region Region Settings
+
// Load region settings
m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
if (m_storageManager.EstateDataStore != null)
@@ -657,6 +652,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ #endregion Region Settings
+
MainConsole.Instance.Commands.AddCommand("region", false, "reload estate",
"reload estate",
"Reload the estate data", HandleReloadEstate);
@@ -701,6 +698,8 @@ namespace OpenSim.Region.Framework.Scenes
m_simulatorVersion = simulatorVersion + " (" + Util.GetRuntimeInformation() + ")";
+ #region Region Config
+
try
{
// Region config overrides global config
@@ -754,38 +753,6 @@ namespace OpenSim.Region.Framework.Scenes
m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
- IConfig interest_management_config = m_config.Configs["InterestManagement"];
- if (interest_management_config != null)
- {
- string update_prioritization_scheme = interest_management_config.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower();
- switch (update_prioritization_scheme)
- {
- case "time":
- m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time;
- break;
- case "distance":
- m_update_prioritization_scheme = UpdatePrioritizationSchemes.Distance;
- break;
- case "simpleangulardistance":
- m_update_prioritization_scheme = UpdatePrioritizationSchemes.SimpleAngularDistance;
- break;
- case "frontback":
- m_update_prioritization_scheme = UpdatePrioritizationSchemes.FrontBack;
- break;
- default:
- m_log.Warn("[SCENE]: UpdatePrioritizationScheme was not recognized, setting to default settomg of Time");
- m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time;
- break;
- }
-
- m_reprioritization_enabled = interest_management_config.GetBoolean("ReprioritizationEnabled", true);
- m_reprioritization_interval = interest_management_config.GetDouble("ReprioritizationInterval", 5000.0);
- m_root_reprioritization_distance = interest_management_config.GetDouble("RootReprioritizationDistance", 10.0);
- m_child_reprioritization_distance = interest_management_config.GetDouble("ChildReprioritizationDistance", 20.0);
- }
-
- m_log.Info("[SCENE]: Using the " + m_update_prioritization_scheme + " prioritization scheme");
-
#region BinaryStats
try
@@ -822,6 +789,35 @@ namespace OpenSim.Region.Framework.Scenes
{
m_log.Warn("[SCENE]: Failed to load StartupConfig");
}
+
+ #endregion Region Config
+
+ #region Interest Management
+
+ IConfig interestConfig = m_config.Configs["InterestManagement"];
+ if (interestConfig != null)
+ {
+ string update_prioritization_scheme = interestConfig.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower();
+
+ try
+ {
+ m_priorityScheme = (UpdatePrioritizationSchemes)Enum.Parse(typeof(UpdatePrioritizationSchemes), update_prioritization_scheme, true);
+ }
+ catch (Exception)
+ {
+ m_log.Warn("[PRIORITIZER]: UpdatePrioritizationScheme was not recognized, setting to default prioritizer Time");
+ m_priorityScheme = UpdatePrioritizationSchemes.Time;
+ }
+
+ m_reprioritizationEnabled = interestConfig.GetBoolean("ReprioritizationEnabled", true);
+ m_reprioritizationInterval = interestConfig.GetDouble("ReprioritizationInterval", 5000.0);
+ m_rootReprioritizationDistance = interestConfig.GetDouble("RootReprioritizationDistance", 10.0);
+ m_childReprioritizationDistance = interestConfig.GetDouble("ChildReprioritizationDistance", 20.0);
+ }
+
+ m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme");
+
+ #endregion Interest Management
}
///
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 8aefd50..4453beb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3602,106 +3602,7 @@ namespace OpenSim.Region.Framework.Scenes
SetFromItemID(uuid);
}
- #endregion
- public double GetUpdatePriority(IClientAPI client)
- {
- switch (Scene.UpdatePrioritizationScheme)
- {
- case Scene.UpdatePrioritizationSchemes.Time:
- return GetPriorityByTime();
- case Scene.UpdatePrioritizationSchemes.Distance:
- return GetPriorityByDistance(client);
- case Scene.UpdatePrioritizationSchemes.SimpleAngularDistance:
- return GetPriorityBySimpleAngularDistance(client);
- case Scenes.Scene.UpdatePrioritizationSchemes.FrontBack:
- return GetPriorityByFrontBack(client);
- default:
- throw new InvalidOperationException("UpdatePrioritizationScheme not defined");
- }
- }
-
- private double GetPriorityByTime()
- {
- return DateTime.Now.ToOADate();
- }
-
- private double GetPriorityByDistance(IClientAPI client)
- {
- ScenePresence presence = Scene.GetScenePresence(client.AgentId);
- if (presence != null)
- {
- return GetPriorityByDistance((presence.IsChildAgent) ?
- presence.AbsolutePosition : presence.CameraPosition);
- }
- return double.NaN;
- }
-
- private double GetPriorityBySimpleAngularDistance(IClientAPI client)
- {
- ScenePresence presence = Scene.GetScenePresence(client.AgentId);
- if (presence != null)
- {
- return GetPriorityBySimpleAngularDistance((presence.IsChildAgent) ?
- presence.AbsolutePosition : presence.CameraPosition);
- }
- return double.NaN;
- }
-
- private double GetPriorityByFrontBack(IClientAPI client)
- {
- ScenePresence presence = Scene.GetScenePresence(client.AgentId);
- if (presence != null)
- {
- return GetPriorityByFrontBack(presence.CameraPosition, presence.CameraAtAxis);
- }
- return double.NaN;
- }
-
- public double GetPriorityByDistance(Vector3 position)
- {
- return Vector3.Distance(AbsolutePosition, position);
- }
-
- public double GetPriorityBySimpleAngularDistance(Vector3 position)
- {
- double distance = Vector3.Distance(position, AbsolutePosition);
- if (distance >= double.Epsilon)
- {
- float height;
- Vector3 box = GetAxisAlignedBoundingBox(out height);
-
- double angle = box.X / distance;
- double max = angle;
-
- angle = box.Y / distance;
- if (max < angle)
- max = angle;
-
- angle = box.Z / distance;
- if (max < angle)
- max = angle;
-
- return -max;
- }
- else
- return double.MinValue;
- }
-
- public double GetPriorityByFrontBack(Vector3 camPosition, Vector3 camAtAxis)
- {
- // Distance
- double priority = Vector3.Distance(camPosition, AbsolutePosition);
-
- // Scale
- //priority -= GroupScale().Length();
-
- // Plane equation
- float d = -Vector3.Dot(camPosition, camAtAxis);
- float p = Vector3.Dot(camAtAxis, AbsolutePosition) + d;
- if (p < 0.0f) priority *= 2.0f;
-
- return priority;
- }
+ #endregion
}
}
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index ee0eb07..2ce1b68 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3777,123 +3777,9 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- public double GetUpdatePriority(IClientAPI client)
- {
- switch (Scene.UpdatePrioritizationScheme)
- {
- case Scene.UpdatePrioritizationSchemes.Time:
- return GetPriorityByTime();
- case Scene.UpdatePrioritizationSchemes.Distance:
- return GetPriorityByDistance(client);
- case Scene.UpdatePrioritizationSchemes.SimpleAngularDistance:
- return GetPriorityByDistance(client);
- case Scenes.Scene.UpdatePrioritizationSchemes.FrontBack:
- return GetPriorityByFrontBack(client);
- default:
- throw new InvalidOperationException("UpdatePrioritizationScheme not defined.");
- }
- }
-
- private double GetPriorityByTime()
- {
- return DateTime.Now.ToOADate();
- }
-
- private double GetPriorityByDistance(IClientAPI client)
- {
- ScenePresence presence = Scene.GetScenePresence(client.AgentId);
- if (presence != null)
- {
- return GetPriorityByDistance((presence.IsChildAgent) ?
- presence.AbsolutePosition : presence.CameraPosition);
- }
- return double.NaN;
- }
-
- private double GetPriorityByFrontBack(IClientAPI client)
- {
- ScenePresence presence = Scene.GetScenePresence(client.AgentId);
- if (presence != null)
- {
- return GetPriorityByFrontBack(presence.CameraPosition, presence.CameraAtAxis);
- }
- return double.NaN;
- }
-
- private double GetPriorityByDistance(Vector3 position)
- {
- return Vector3.Distance(AbsolutePosition, position);
- }
-
- private double GetPriorityByFrontBack(Vector3 camPosition, Vector3 camAtAxis)
- {
- // Distance
- double priority = Vector3.Distance(camPosition, AbsolutePosition);
-
- // Plane equation
- float d = -Vector3.Dot(camPosition, camAtAxis);
- float p = Vector3.Dot(camAtAxis, AbsolutePosition) + d;
- if (p < 0.0f) priority *= 2.0f;
-
- return priority;
- }
-
- private double GetSOGUpdatePriority(SceneObjectGroup sog)
- {
- switch (Scene.UpdatePrioritizationScheme)
- {
- case Scene.UpdatePrioritizationSchemes.Time:
- throw new InvalidOperationException("UpdatePrioritizationScheme for time not supported for reprioritization");
- case Scene.UpdatePrioritizationSchemes.Distance:
- return sog.GetPriorityByDistance((IsChildAgent) ? AbsolutePosition : CameraPosition);
- case Scene.UpdatePrioritizationSchemes.SimpleAngularDistance:
- return sog.GetPriorityBySimpleAngularDistance((IsChildAgent) ? AbsolutePosition : CameraPosition);
- case Scenes.Scene.UpdatePrioritizationSchemes.FrontBack:
- return sog.GetPriorityByFrontBack(CameraPosition, CameraAtAxis);
- default:
- throw new InvalidOperationException("UpdatePrioritizationScheme not defined");
- }
- }
-
- private double UpdatePriority(UpdatePriorityData data)
- {
- EntityBase entity;
- SceneObjectGroup group;
-
- if (Scene.Entities.TryGetValue(data.localID, out entity))
- {
- group = entity as SceneObjectGroup;
- if (group != null)
- return GetSOGUpdatePriority(group);
-
- ScenePresence presence = entity as ScenePresence;
- if (presence == null)
- throw new InvalidOperationException("entity found is neither SceneObjectGroup nor ScenePresence");
- switch (Scene.UpdatePrioritizationScheme)
- {
- case Scene.UpdatePrioritizationSchemes.Time:
- throw new InvalidOperationException("UpdatePrioritization for time not supported for reprioritization");
- case Scene.UpdatePrioritizationSchemes.Distance:
- case Scene.UpdatePrioritizationSchemes.SimpleAngularDistance:
- return GetPriorityByDistance((IsChildAgent) ? AbsolutePosition : CameraPosition);
- case Scenes.Scene.UpdatePrioritizationSchemes.FrontBack:
- return GetPriorityByFrontBack(CameraPosition, CameraAtAxis);
- default:
- throw new InvalidOperationException("UpdatePrioritizationScheme not defined");
- }
- }
- else
- {
- group = Scene.GetGroupByPrim(data.localID);
- if (group != null)
- return GetSOGUpdatePriority(group);
- }
- return double.NaN;
- }
-
private void ReprioritizeUpdates()
{
- if (Scene.IsReprioritizationEnabled && Scene.UpdatePrioritizationScheme != Scene.UpdatePrioritizationSchemes.Time)
+ if (Scene.IsReprioritizationEnabled && Scene.UpdatePrioritizationScheme != UpdatePrioritizationSchemes.Time)
{
lock (m_reprioritization_timer)
{
@@ -3907,7 +3793,7 @@ namespace OpenSim.Region.Framework.Scenes
private void Reprioritize(object sender, ElapsedEventArgs e)
{
- m_controllingClient.ReprioritizeUpdates(UpdatePriority);
+ m_controllingClient.ReprioritizeUpdates();
lock (m_reprioritization_timer)
{
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 84faac0..27de529 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1065,7 +1065,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
}
- public void ReprioritizeUpdates(UpdatePriorityHandler handler)
+ public void ReprioritizeUpdates()
{
}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 9066691..d2279c7 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -638,7 +638,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
- public void ReprioritizeUpdates(UpdatePriorityHandler handler)
+ public void ReprioritizeUpdates()
{
}
--
cgit v1.1