aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorDiva Canto2010-12-14 16:04:28 -0800
committerDiva Canto2010-12-14 16:04:28 -0800
commita4309578e24e57f596a881ba5e55b81cca74c3ec (patch)
tree6e02314d2cbf2a5a8995b7681a198de77e147b62 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parentRelax a highly constraining lock on m_entityUpdates that may be preventing re... (diff)
downloadopensim-SC_OLD-a4309578e24e57f596a881ba5e55b81cca74c3ec.zip
opensim-SC_OLD-a4309578e24e57f596a881ba5e55b81cca74c3ec.tar.gz
opensim-SC_OLD-a4309578e24e57f596a881ba5e55b81cca74c3ec.tar.bz2
opensim-SC_OLD-a4309578e24e57f596a881ba5e55b81cca74c3ec.tar.xz
Another stab at #LoginLag. Looking forward to hear the feedback! This makes updates for self movement as absolute top priority, going in to the unthrottled category. Self only, not other avies.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs25
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 979dd47..2a59a0c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3553,6 +3553,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3553 OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); 3553 OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
3554 OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); 3554 OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
3555 OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>(); 3555 OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
3556 OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseAgentUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
3556 3557
3557 if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; 3558 if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
3558 int updatesThisCall = 0; 3559 int updatesThisCall = 0;
@@ -3698,7 +3699,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3698 } 3699 }
3699 else 3700 else
3700 { 3701 {
3701 terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); 3702 if (update.Entity is ScenePresence && ((ScenePresence)update.Entity).UUID == AgentId)
3703 // Self updates go into a special list
3704 terseAgentUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
3705 else
3706 // Everything else goes here
3707 terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
3702 } 3708 }
3703 3709
3704 #endregion Block Construction 3710 #endregion Block Construction
@@ -3708,7 +3714,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3708 3714
3709 const float TIME_DILATION = 1.0f; 3715 const float TIME_DILATION = 1.0f;
3710 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); 3716 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
3711 3717
3718 if (terseAgentUpdateBlocks.IsValueCreated)
3719 {
3720 List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value;
3721
3722 ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
3723 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3724 packet.RegionData.TimeDilation = timeDilation;
3725 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
3726
3727 for (int i = 0; i < blocks.Count; i++)
3728 packet.ObjectData[i] = blocks[i];
3729
3730 OutPacket(packet, ThrottleOutPacketType.Unknown, true);
3731 }
3732
3712 if (objectUpdateBlocks.IsValueCreated) 3733 if (objectUpdateBlocks.IsValueCreated)
3713 { 3734 {
3714 List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value; 3735 List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;