aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Prioritizer.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-26 23:06:41 +0100
committerJustin Clark-Casey (justincc)2011-08-26 23:06:41 +0100
commit15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a (patch)
tree25b452008eb21a6426617c65af866161cf3bcae8 /OpenSim/Region/Framework/Scenes/Prioritizer.cs
parentrefactor: move SOG.DetachToGround() to AttachmentsModule.DetachSceneObjectToG... (diff)
downloadopensim-SC_OLD-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.zip
opensim-SC_OLD-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.tar.gz
opensim-SC_OLD-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.tar.bz2
opensim-SC_OLD-15a514fcbc8f7447fc3a5997b6bbc2fe35974c9a.tar.xz
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
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Prioritizer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs7
1 files changed, 3 insertions, 4 deletions
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
116 return priority; 116 return priority;
117 } 117 }
118 118
119
120 private uint GetPriorityByTime(IClientAPI client, ISceneEntity entity) 119 private uint GetPriorityByTime(IClientAPI client, ISceneEntity entity)
121 { 120 {
122 // And anything attached to this avatar gets top priority as well 121 // And anything attached to this avatar gets top priority as well
123 if (entity is SceneObjectPart) 122 if (entity is SceneObjectPart)
124 { 123 {
125 SceneObjectPart sop = (SceneObjectPart)entity; 124 SceneObjectPart sop = (SceneObjectPart)entity;
126 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) 125 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
127 return 1; 126 return 1;
128 } 127 }
129 128
@@ -136,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes
136 if (entity is SceneObjectPart) 135 if (entity is SceneObjectPart)
137 { 136 {
138 SceneObjectPart sop = (SceneObjectPart)entity; 137 SceneObjectPart sop = (SceneObjectPart)entity;
139 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) 138 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
140 return 1; 139 return 1;
141 } 140 }
142 141
@@ -149,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes
149 if (entity is SceneObjectPart) 148 if (entity is SceneObjectPart)
150 { 149 {
151 SceneObjectPart sop = (SceneObjectPart)entity; 150 SceneObjectPart sop = (SceneObjectPart)entity;
152 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) 151 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
153 return 1; 152 return 1;
154 } 153 }
155 154