diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Prioritizer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Prioritizer.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 657df15..0a34a4c 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.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.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.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar) |
153 | return 1; | 152 | return 1; |
154 | } | 153 | } |
155 | 154 | ||
@@ -172,7 +171,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
172 | if (entity is SceneObjectPart) | 171 | if (entity is SceneObjectPart) |
173 | { | 172 | { |
174 | // Attachments are high priority, | 173 | // Attachments are high priority, |
175 | if (((SceneObjectPart)entity).ParentGroup.RootPart.IsAttachment) | 174 | if (((SceneObjectPart)entity).ParentGroup.IsAttachment) |
176 | return 1; | 175 | return 1; |
177 | 176 | ||
178 | // Non physical prims are lower priority than physical prims | 177 | // Non physical prims are lower priority than physical prims |
@@ -209,8 +208,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
209 | if (entity is SceneObjectPart) | 208 | if (entity is SceneObjectPart) |
210 | { | 209 | { |
211 | SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup; | 210 | SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup; |
212 | if (group != null) | 211 | entityPos = group.AbsolutePosition; |
213 | entityPos = group.AbsolutePosition; | ||
214 | } | 212 | } |
215 | 213 | ||
216 | // Use the camera position for local agents and avatar position for remote agents | 214 | // Use the camera position for local agents and avatar position for remote agents |