aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-06-07 18:49:22 +0100
committerJustin Clark-Casey (justincc)2010-06-07 19:14:40 +0100
commit912f0c7fde1d3ec159b9f9b61136a2ac64e7d9dd (patch)
tree7320f592a1400241bec3855d48ba3036f5033744 /OpenSim/Region/ClientStack
parentreapply fix for double sending of attachment update on standalone region cros... (diff)
downloadopensim-SC-912f0c7fde1d3ec159b9f9b61136a2ac64e7d9dd.zip
opensim-SC-912f0c7fde1d3ec159b9f9b61136a2ac64e7d9dd.tar.gz
opensim-SC-912f0c7fde1d3ec159b9f9b61136a2ac64e7d9dd.tar.bz2
opensim-SC-912f0c7fde1d3ec159b9f9b61136a2ac64e7d9dd.tar.xz
Stop some hud components disappearing on region crossings
If viewers (or at least, Linden Viewer 1.23.5) receive child hud object updates before the root prim, then the children are not displayed. Updates were being queued in LLClientView in the right order (root first) but were being sent in a random order since they were all at the same prioritization This commit prioritizes the root prim of a hud to its highest level when queued. I'm not sure if the periodic reprioritization triggered via ScenePresence might reset this, but boosting priority appears to work so far. Also committed is a belt and braces mechanism in LLClientView to prevent child hud prim being sent out before their root, but since this doesn't appear to be needed it is currently commented out.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs54
1 files changed, 46 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 724c8bc..37929f2 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -365,6 +365,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
365 /// </value> 365 /// </value>
366 protected HashSet<uint> m_killRecord; 366 protected HashSet<uint> m_killRecord;
367 367
368// protected HashSet<uint> m_attachmentsQueued;
369// protected HashSet<uint> m_attachmentsSent;
370
368 private int m_moneyBalance; 371 private int m_moneyBalance;
369 private int m_animationSequenceNumber = 1; 372 private int m_animationSequenceNumber = 1;
370 private bool m_SendLogoutPacketWhenClosing = true; 373 private bool m_SendLogoutPacketWhenClosing = true;
@@ -456,6 +459,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
456 m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); 459 m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count);
457 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); 460 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
458 m_killRecord = new HashSet<uint>(); 461 m_killRecord = new HashSet<uint>();
462// m_attachmentsQueued = new HashSet<uint>();
463// m_attachmentsSent = new HashSet<uint>();
459 464
460 m_assetService = m_scene.RequestModuleInterface<IAssetService>(); 465 m_assetService = m_scene.RequestModuleInterface<IAssetService>();
461 m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>(); 466 m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>();
@@ -3401,6 +3406,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3401 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data); 3406 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data);
3402 3407
3403 OutPacket(objupdate, ThrottleOutPacketType.Task); 3408 OutPacket(objupdate, ThrottleOutPacketType.Task);
3409
3410 // We need to record the avatar local id since the root prim of an attachment points to this.
3411// m_attachmentsSent.Add(data.AvatarLocalID);
3404 } 3412 }
3405 3413
3406 /// <summary> 3414 /// <summary>
@@ -3523,6 +3531,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3523 return; 3531 return;
3524 3532
3525 ObjectUpdatePacket.ObjectDataBlock objectData = CreatePrimUpdateBlock(data); 3533 ObjectUpdatePacket.ObjectDataBlock objectData = CreatePrimUpdateBlock(data);
3534
3535// if (data.attachment)
3536// m_attachmentsQueued.Add(data.localID);
3526 3537
3527 lock (m_primFullUpdates.SyncRoot) 3538 lock (m_primFullUpdates.SyncRoot)
3528 m_primFullUpdates.Enqueue(data.priority, objectData, data.localID); 3539 m_primFullUpdates.Enqueue(data.priority, objectData, data.localID);
@@ -3549,15 +3560,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3549 ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue(); 3560 ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue();
3550 3561
3551 if (!m_killRecord.Contains(block.ID)) 3562 if (!m_killRecord.Contains(block.ID))
3552 { 3563 {
3564// if (m_attachmentsQueued.Contains(block.ID))
3565// {
3566// string text = Util.FieldToString(block.Text);
3567// if (text.IndexOf("\n") >= 0)
3568// text = text.Remove(text.IndexOf("\n"));
3569//
3570// if (m_attachmentsSent.Contains(block.ParentID))
3571// {
3572// m_log.DebugFormat(
3573// "[CLIENT]: Sending full info about attached prim {0} text {1}",
3574// block.ID, text);
3575//
3576// m_fullUpdateDataBlocksBuilder.Add(block);
3577//
3578// m_attachmentsSent.Add(block.ID);
3579// }
3580// else
3581// {
3582// m_log.DebugFormat(
3583// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet",
3584// block.ID, text, block.ParentID);
3585//
3586// lock (m_primFullUpdates.SyncRoot)
3587// m_primFullUpdates.Enqueue(double.MaxValue, block, block.ID);
3588// }
3589// }
3590// else
3591// {
3553 m_fullUpdateDataBlocksBuilder.Add(block); 3592 m_fullUpdateDataBlocksBuilder.Add(block);
3554 3593// }
3555// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
3556// if (text.IndexOf("\n") >= 0)
3557// text = text.Remove(text.IndexOf("\n"));
3558// m_log.DebugFormat(
3559// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
3560// outPacket.ObjectData[i].ID, text, Name);
3561 } 3594 }
3562// else 3595// else
3563// { 3596// {
@@ -4506,6 +4539,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4506 4539
4507 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SendPrimitiveData data) 4540 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SendPrimitiveData data)
4508 { 4541 {
4542// if (data.attachment)
4543// m_log.DebugFormat(
4544// "[LLCLIENTVIEW]: Creating prim update block for {0}, parent {1}, priority {2}",
4545// data.localID, data.parentID, data.priority);
4546
4509 byte[] objectData = new byte[60]; 4547 byte[] objectData = new byte[60];
4510 data.pos.ToBytes(objectData, 0); 4548 data.pos.ToBytes(objectData, 0);
4511 data.vel.ToBytes(objectData, 12); 4549 data.vel.ToBytes(objectData, 12);