From 52afd8588d07cc063e4a7e0fe9ace129de1e7a7a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 19 Aug 2016 17:49:59 +0100 Subject: fix updates resend by reEnqueing, that got broken down the line --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f580e5a..78043bd 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4221,26 +4221,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (!canUseImproved && !canUseCompressed) { + ObjectUpdatePacket.ObjectDataBlock ablock; if (update.Entity is ScenePresence) - { - ObjectUpdatePacket.ObjectDataBlock ablock = - CreateAvatarUpdateBlock((ScenePresence)update.Entity); - objectUpdateBlocks.Value.Add(ablock); - maxUpdatesBytes -= ablock.Length; - } + ablock = CreateAvatarUpdateBlock((ScenePresence)update.Entity); else - { - ObjectUpdatePacket.ObjectDataBlock ablock = - CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId); - objectUpdateBlocks.Value.Add(ablock); - maxUpdatesBytes -= ablock.Length; - } + ablock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId); + objectUpdateBlocks.Value.Add(ablock); + objectUpdates.Value.Add(update); + maxUpdatesBytes -= ablock.Length; + } else if (!canUseImproved) { ObjectUpdateCompressedPacket.ObjectDataBlock ablock = CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags); compressedUpdateBlocks.Value.Add(ablock); + compressedUpdates.Value.Add(update); maxUpdatesBytes -= ablock.Length; } else @@ -4251,6 +4247,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ImprovedTerseObjectUpdatePacket.ObjectDataBlock ablock = CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)); terseAgentUpdateBlocks.Value.Add(ablock); + terseAgentUpdates.Value.Add(update); maxUpdatesBytes -= ablock.Length; } else @@ -4259,6 +4256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ImprovedTerseObjectUpdatePacket.ObjectDataBlock ablock = CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)); terseUpdateBlocks.Value.Add(ablock); + terseUpdates.Value.Add(update); maxUpdatesBytes -= ablock.Length; } } @@ -4290,7 +4288,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP for (int i = 0; i < blocks.Count; i++) packet.ObjectData[i] = blocks[i]; - OutPacket(packet, ThrottleOutPacketType.Unknown, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); + OutPacket(packet, ThrottleOutPacketType.Unknown, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseAgentUpdates.Value, oPacket); }); } if (objectUpdateBlocks.IsValueCreated) @@ -4305,7 +4303,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP for (int i = 0; i < blocks.Count; i++) packet.ObjectData[i] = blocks[i]; - OutPacket(packet, ThrottleOutPacketType.Task, true); + OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); }); } if (compressedUpdateBlocks.IsValueCreated) @@ -4320,7 +4318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP for (int i = 0; i < blocks.Count; i++) packet.ObjectData[i] = blocks[i]; - OutPacket(packet, ThrottleOutPacketType.Task, true); + OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); }); } if (terseUpdateBlocks.IsValueCreated) -- cgit v1.1