aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs23
1 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index cbf40c8..53ca849 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -172,14 +172,22 @@ namespace OpenSim.Region.Framework.Scenes
172 172
173 if (entity is SceneObjectPart) 173 if (entity is SceneObjectPart)
174 { 174 {
175 SceneObjectGroup sog = ((SceneObjectPart)entity).ParentGroup;
175 // Attachments are high priority, 176 // Attachments are high priority,
176 if (((SceneObjectPart)entity).ParentGroup.IsAttachment) 177 if (sog.IsAttachment)
177 return 2; 178 return 2;
179
180
181 if(presence.ParentPart != null)
182 {
183 if(presence.ParentPart.ParentGroup == sog)
184 return 2;
185 }
178 186
179 pqueue = ComputeDistancePriority(client, entity, false); 187 pqueue = ComputeDistancePriority(client, entity, false);
180 188
181 // Non physical prims are lower priority than physical prims 189 // Non physical prims are lower priority than physical prims
182 PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor; 190 PhysicsActor physActor = sog.RootPart.PhysActor;
183 if (physActor == null || !physActor.IsPhysical) 191 if (physActor == null || !physActor.IsPhysical)
184 pqueue++; 192 pqueue++;
185 } 193 }
@@ -302,6 +310,17 @@ namespace OpenSim.Region.Framework.Scenes
302 else 310 else
303 { 311 {
304 SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup; 312 SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup;
313 if(presence.ParentPart != null)
314 {
315 if(presence.ParentPart.ParentGroup == group)
316 return pqueue;
317 }
318 if(group.IsAttachment)
319 {
320 if(group.RootPart.LocalId == presence.LocalId)
321 return pqueue;
322 }
323
305 float bradius = group.GetBoundsRadius(); 324 float bradius = group.GetBoundsRadius();
306 Vector3 grppos = group.AbsolutePosition + group.getBoundsCenter(); 325 Vector3 grppos = group.AbsolutePosition + group.getBoundsCenter();
307 distance = Vector3.Distance(presencePos, grppos); 326 distance = Vector3.Distance(presencePos, grppos);