aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-04-14 22:02:40 +0100
committerUbitUmarov2017-04-14 22:02:40 +0100
commit73be6cb269527348a2f1be7c74eac7b5145d583a (patch)
tree56fe306817f2f6f88a307478fd25ccacaffc2ec3
parentadd functions to send entity updates imediatly, except for avatars (or now) t... (diff)
downloadopensim-SC_OLD-73be6cb269527348a2f1be7c74eac7b5145d583a.zip
opensim-SC_OLD-73be6cb269527348a2f1be7c74eac7b5145d583a.tar.gz
opensim-SC_OLD-73be6cb269527348a2f1be7c74eac7b5145d583a.tar.bz2
opensim-SC_OLD-73be6cb269527348a2f1be7c74eac7b5145d583a.tar.xz
increase the updates priority of linkset where avatar is sitting
-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);