fix updates resend by reEnqueing, that got broken down the line

LSLKeyTest
UbitUmarov 2016-08-19 17:49:59 +01:00
parent 3fef576554
commit 52afd8588d
1 changed files with 13 additions and 15 deletions

View File

@ -4221,26 +4221,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (!canUseImproved && !canUseCompressed) if (!canUseImproved && !canUseCompressed)
{ {
ObjectUpdatePacket.ObjectDataBlock ablock;
if (update.Entity is ScenePresence) if (update.Entity is ScenePresence)
{ ablock = CreateAvatarUpdateBlock((ScenePresence)update.Entity);
ObjectUpdatePacket.ObjectDataBlock ablock =
CreateAvatarUpdateBlock((ScenePresence)update.Entity);
objectUpdateBlocks.Value.Add(ablock);
maxUpdatesBytes -= ablock.Length;
}
else else
{ ablock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId);
ObjectUpdatePacket.ObjectDataBlock ablock = objectUpdateBlocks.Value.Add(ablock);
CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId); objectUpdates.Value.Add(update);
objectUpdateBlocks.Value.Add(ablock); maxUpdatesBytes -= ablock.Length;
maxUpdatesBytes -= ablock.Length;
}
} }
else if (!canUseImproved) else if (!canUseImproved)
{ {
ObjectUpdateCompressedPacket.ObjectDataBlock ablock = ObjectUpdateCompressedPacket.ObjectDataBlock ablock =
CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags); CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags);
compressedUpdateBlocks.Value.Add(ablock); compressedUpdateBlocks.Value.Add(ablock);
compressedUpdates.Value.Add(update);
maxUpdatesBytes -= ablock.Length; maxUpdatesBytes -= ablock.Length;
} }
else else
@ -4251,6 +4247,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ImprovedTerseObjectUpdatePacket.ObjectDataBlock ablock = ImprovedTerseObjectUpdatePacket.ObjectDataBlock ablock =
CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)); CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures));
terseAgentUpdateBlocks.Value.Add(ablock); terseAgentUpdateBlocks.Value.Add(ablock);
terseAgentUpdates.Value.Add(update);
maxUpdatesBytes -= ablock.Length; maxUpdatesBytes -= ablock.Length;
} }
else else
@ -4259,6 +4256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ImprovedTerseObjectUpdatePacket.ObjectDataBlock ablock = ImprovedTerseObjectUpdatePacket.ObjectDataBlock ablock =
CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)); CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures));
terseUpdateBlocks.Value.Add(ablock); terseUpdateBlocks.Value.Add(ablock);
terseUpdates.Value.Add(update);
maxUpdatesBytes -= ablock.Length; maxUpdatesBytes -= ablock.Length;
} }
} }
@ -4290,7 +4288,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < blocks.Count; i++) for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[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) if (objectUpdateBlocks.IsValueCreated)
@ -4305,7 +4303,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < blocks.Count; i++) for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[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) if (compressedUpdateBlocks.IsValueCreated)
@ -4320,7 +4318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < blocks.Count; i++) for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[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) if (terseUpdateBlocks.IsValueCreated)