From 15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 26 Aug 2011 23:06:41 +0100 Subject: refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar This does a tiny bit to reduce code complexity, memory requirement and the cpu time of pointlessly setting this field to the same value in every SOP --- OpenSim/Region/Framework/Scenes/Prioritizer.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Prioritizer.cs') diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 4595a29..2a76755 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -116,14 +116,13 @@ namespace OpenSim.Region.Framework.Scenes return priority; } - private uint GetPriorityByTime(IClientAPI client, ISceneEntity entity) { // And anything attached to this avatar gets top priority as well if (entity is SceneObjectPart) { SceneObjectPart sop = (SceneObjectPart)entity; - if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) + if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) return 1; } @@ -136,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes if (entity is SceneObjectPart) { SceneObjectPart sop = (SceneObjectPart)entity; - if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) + if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) return 1; } @@ -149,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes if (entity is SceneObjectPart) { SceneObjectPart sop = (SceneObjectPart)entity; - if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) + if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) return 1; } -- cgit v1.1