aboutsummaryrefslogtreecommitdiffstatshomepage
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
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 '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs54
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs31
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs4
-rwxr-xr-xbin/OpenSim.exe.config4
4 files changed, 79 insertions, 14 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);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 33624a2..479ee4d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2929,10 +2929,33 @@ namespace OpenSim.Region.Framework.Scenes
2929 //isattachment = ParentGroup.RootPart.IsAttachment; 2929 //isattachment = ParentGroup.RootPart.IsAttachment;
2930 2930
2931 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; 2931 byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A};
2932 remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape, 2932
2933 lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID, 2933 double priority = ParentGroup.GetUpdatePriority(remoteClient);
2934 m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, 2934 if (IsRoot && IsAttachment)
2935 AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient))); 2935 {
2936 if (double.MinValue == priority)
2937 {
2938 m_log.WarnFormat(
2939 "[SOP]: Couldn't raise update priority of root part for attachment {0} {1} because priority is already highest value",
2940 Name, LocalId);
2941 }
2942 else
2943 {
2944 priority = double.MinValue;
2945 }
2946 }
2947
2948 remoteClient.SendPrimitiveToClient(
2949 new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape,
2950 lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID,
2951 m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment,
2952 AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, priority));
2953
2954// if (IsRoot && IsAttachment)
2955// {
2956// ScenePresence sp = ParentGroup.Scene.GetScenePresence(remoteClient.AgentId);
2957// remoteClient.ReprioritizeUpdates(StateUpdateTypes.PrimitiveFull, sp.UpdatePriority);
2958// }
2936 } 2959 }
2937 2960
2938 /// <summary> 2961 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 4973663..18f2fd2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3871,8 +3871,10 @@ namespace OpenSim.Region.Framework.Scenes
3871 } 3871 }
3872 } 3872 }
3873 3873
3874 private double UpdatePriority(UpdatePriorityData data) 3874 internal double UpdatePriority(UpdatePriorityData data)
3875 { 3875 {
3876// m_log.DebugFormat("[SCENE PRESENCE]: Reprioritizing updates to client {0} for {1}", Name, data.localID);
3877
3876 EntityBase entity; 3878 EntityBase entity;
3877 SceneObjectGroup group; 3879 SceneObjectGroup group;
3878 3880
diff --git a/bin/OpenSim.exe.config b/bin/OpenSim.exe.config
index 4e7ef51..aa2162e 100755
--- a/bin/OpenSim.exe.config
+++ b/bin/OpenSim.exe.config
@@ -12,7 +12,9 @@
12 <log4net> 12 <log4net>
13 <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console"> 13 <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
14 <layout type="log4net.Layout.PatternLayout"> 14 <layout type="log4net.Layout.PatternLayout">
15 <conversionPattern value="%date{HH:mm:ss,fff} - %message" /> 15 <conversionPattern value="%date{HH:mm:ss} - %message" />
16 <!-- Use the line below instead of the one above if you want milliseconds in your log timestamps -->
17 <!-- <conversionPattern value="%date{HH:mm:ss,fff} - %message" /> -->
16 </layout> 18 </layout>
17 </appender> 19 </appender>
18 20