Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aurora-sim/Aurora-Sim
Browse files Browse the repository at this point in the history
  • Loading branch information
RevolutionSmythe authored and RevolutionSmythe committed Mar 12, 2011
2 parents ea3dc7e + d046857 commit 176ca1f
Show file tree
Hide file tree
Showing 3 changed files with 212 additions and 95 deletions.
11 changes: 7 additions & 4 deletions OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4061,6 +4061,10 @@ public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags,doub

public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{

if(entity is ScenePresence)
SendAvatarUpdate(entity, updateFlags); // don't queue avatars info

object[] o = new object[]{ entity, updateFlags };
m_UpdatesQueue.Enqueue(o);
}
Expand All @@ -4075,20 +4079,19 @@ public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
public void DequeueUpdates(int nupdates)
{
object o;
while (m_UpdatesQueue.Dequeue(out o) && nupdates-- > 0)
while (m_UpdatesQueue.Dequeue(out o))
{
ISceneEntity entity = (ISceneEntity)((object[])o)[0];
PrimUpdateFlags updateFlags = (PrimUpdateFlags)((object[])o)[1];
if (entity is ScenePresence)
SendAvatarUpdate(entity, updateFlags);
else
intSendPrimUpdate(entity, updateFlags);
if (--nupdates <= 0)
break;
}
}




public void QueueDelayedUpdate(PriorityQueueItem<EntityUpdate, double> it)
{
PriorityQueueItem<EntityUpdate, double> item = new PriorityQueueItem<EntityUpdate,double>();
Expand Down
4 changes: 2 additions & 2 deletions OpenSim/Region/Framework/Scenes/Prioritizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ private double GetPriorityByOOBDistance(IClientAPI client, ISceneEntity entity)
// before its scheduled update was triggered
//entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
SceneObjectPart p = (SceneObjectPart)entity;
entityPos = p.ParentGroup.AbsolutePosition + p.OOBoffset;
entityPos = p.ParentGroup.AbsolutePosition + p.OOBoffset * p.ParentGroup.GroupRotation;
oobSQ = p.ParentGroup.BSphereRadiusSQ;
}
else if (entity is SceneObjectGroup)
{
SceneObjectGroup p = (SceneObjectGroup)entity;
entityPos = p.AbsolutePosition + p.OOBoffset;
entityPos = p.AbsolutePosition + p.OOBoffset * p.GroupRotation;
oobSQ = p.BSphereRadiusSQ;
}
else
Expand Down
Loading

0 comments on commit 176ca1f

Please sign in to comment.