diff options
author | Justin Clark-Casey (justincc) | 2010-06-08 15:07:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-06-08 15:07:57 +0100 |
commit | b6076d7b337dc087807e56cdbe74ef47dc1b66b3 (patch) | |
tree | 7eb2f57ec5f4e62d36f69389c112402d76595ea1 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |
parent | Add a call to SOG.ResumeScripts() after region crossing / teleport (diff) | |
download | opensim-SC_OLD-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.zip opensim-SC_OLD-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.tar.gz opensim-SC_OLD-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.tar.bz2 opensim-SC_OLD-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.tar.xz |
Reduce number of full updates sent on region crossing for attachments/huds to 1 from 3
This is one step towards reducing hud glitches on region crossing, since the viewer fails to display prims if it receives child full updates before the root prim full update
This commit also introduces a mechanism in LLClientView to stop child attachment updates ever going out before the root one
This is a very temporary mechanism and will be commented out when the next step of the fix (to give root prims higher udpate priority) is committed
This code is a foreport from the equivalent changes in 0.6.9-post-fixes
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a516a54..0e58986 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -331,6 +331,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
331 | /// </value> | 331 | /// </value> |
332 | protected HashSet<uint> m_killRecord; | 332 | protected HashSet<uint> m_killRecord; |
333 | 333 | ||
334 | protected HashSet<uint> m_attachmentsSent; | ||
335 | |||
334 | private int m_moneyBalance; | 336 | private int m_moneyBalance; |
335 | private int m_animationSequenceNumber = 1; | 337 | private int m_animationSequenceNumber = 1; |
336 | private bool m_SendLogoutPacketWhenClosing = true; | 338 | private bool m_SendLogoutPacketWhenClosing = true; |
@@ -427,6 +429,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
427 | m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); | 429 | m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); |
428 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); | 430 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); |
429 | m_killRecord = new HashSet<uint>(); | 431 | m_killRecord = new HashSet<uint>(); |
432 | m_attachmentsSent = new HashSet<uint>(); | ||
430 | 433 | ||
431 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 434 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
432 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); | 435 | m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); |
@@ -3411,6 +3414,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3411 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); | 3414 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); |
3412 | 3415 | ||
3413 | OutPacket(objupdate, ThrottleOutPacketType.Task); | 3416 | OutPacket(objupdate, ThrottleOutPacketType.Task); |
3417 | |||
3418 | // We need to record the avatar local id since the root prim of an attachment points to this. | ||
3419 | m_attachmentsSent.Add(avatar.LocalId); | ||
3414 | } | 3420 | } |
3415 | 3421 | ||
3416 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 3422 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
@@ -3466,7 +3472,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3466 | double priority = m_prioritizer.GetUpdatePriority(this, entity); | 3472 | double priority = m_prioritizer.GetUpdatePriority(this, entity); |
3467 | 3473 | ||
3468 | lock (m_entityUpdates.SyncRoot) | 3474 | lock (m_entityUpdates.SyncRoot) |
3469 | m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); | 3475 | m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); |
3470 | } | 3476 | } |
3471 | 3477 | ||
3472 | private void ProcessEntityUpdates(int maxUpdates) | 3478 | private void ProcessEntityUpdates(int maxUpdates) |
@@ -3542,9 +3548,42 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3542 | if (!canUseImproved && !canUseCompressed) | 3548 | if (!canUseImproved && !canUseCompressed) |
3543 | { | 3549 | { |
3544 | if (update.Entity is ScenePresence) | 3550 | if (update.Entity is ScenePresence) |
3551 | { | ||
3545 | objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); | 3552 | objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); |
3553 | } | ||
3546 | else | 3554 | else |
3547 | objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); | 3555 | { |
3556 | if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment) | ||
3557 | { | ||
3558 | SceneObjectPart sop = (SceneObjectPart)update.Entity; | ||
3559 | string text = sop.Text; | ||
3560 | if (text.IndexOf("\n") >= 0) | ||
3561 | text = text.Remove(text.IndexOf("\n")); | ||
3562 | |||
3563 | if (m_attachmentsSent.Contains(sop.ParentID)) | ||
3564 | { | ||
3565 | // m_log.DebugFormat( | ||
3566 | // "[CLIENT]: Sending full info about attached prim {0} text {1}", | ||
3567 | // sop.LocalId, text); | ||
3568 | |||
3569 | objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId)); | ||
3570 | |||
3571 | m_attachmentsSent.Add(sop.LocalId); | ||
3572 | } | ||
3573 | else | ||
3574 | { | ||
3575 | m_log.DebugFormat( | ||
3576 | "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", | ||
3577 | sop.LocalId, text, sop.ParentID); | ||
3578 | |||
3579 | m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); | ||
3580 | } | ||
3581 | } | ||
3582 | else | ||
3583 | { | ||
3584 | objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); | ||
3585 | } | ||
3586 | } | ||
3548 | } | 3587 | } |
3549 | else if (!canUseImproved) | 3588 | else if (!canUseImproved) |
3550 | { | 3589 | { |