From a4309578e24e57f596a881ba5e55b81cca74c3ec Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 14 Dec 2010 16:04:28 -0800 Subject: [PATCH] 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. --- .../ClientStack/LindenUDP/LLClientView.cs | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 979dd47572..2a59a0c1ad 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3553,6 +3553,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OpenSim.Framework.Lazy> objectUpdateBlocks = new OpenSim.Framework.Lazy>(); OpenSim.Framework.Lazy> compressedUpdateBlocks = new OpenSim.Framework.Lazy>(); OpenSim.Framework.Lazy> terseUpdateBlocks = new OpenSim.Framework.Lazy>(); + OpenSim.Framework.Lazy> terseAgentUpdateBlocks = new OpenSim.Framework.Lazy>(); if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; int updatesThisCall = 0; @@ -3698,7 +3699,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); + if (update.Entity is ScenePresence && ((ScenePresence)update.Entity).UUID == AgentId) + // Self updates go into a special list + terseAgentUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); + else + // Everything else goes here + terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); } #endregion Block Construction @@ -3708,7 +3714,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP const float TIME_DILATION = 1.0f; ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); - + + if (terseAgentUpdateBlocks.IsValueCreated) + { + List blocks = terseAgentUpdateBlocks.Value; + + ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); + packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; + packet.RegionData.TimeDilation = timeDilation; + packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; + + for (int i = 0; i < blocks.Count; i++) + packet.ObjectData[i] = blocks[i]; + + OutPacket(packet, ThrottleOutPacketType.Unknown, true); + } + if (objectUpdateBlocks.IsValueCreated) { List blocks = objectUpdateBlocks.Value;