change HandlerDeRezObject again to account for out or order packets

0.9.1.0-post-fixes
UbitUmarov 2018-11-26 04:19:41 +00:00
parent dc9f0d3627
commit 28366f789e
1 changed files with 20 additions and 11 deletions

View File

@ -6926,8 +6926,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true;
}
uint m_DeRezObjectLasSeq = 0;
Dictionary<UUID, List<uint>> m_DeRezObjectDelayed = new Dictionary<UUID, List<uint>>();
private class DeRezObjectInfo
{
public int count;
public List<uint> objectids;
}
private Dictionary<UUID, DeRezObjectInfo> m_DeRezObjectDelayed = new Dictionary<UUID, DeRezObjectInfo>();
private bool HandlerDeRezObject(IClientAPI sender, Packet Pack)
{
@ -6943,11 +6947,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true;
#endregion
uint seq = DeRezPacket.Header.Sequence;
if(seq <= m_DeRezObjectLasSeq)
return true;
m_DeRezObjectLasSeq = seq;
List<uint> deRezIDs;
DeRezAction action = (DeRezAction)DeRezPacket.AgentBlock.Destination;
int numberPackets = DeRezPacket.AgentBlock.PacketCount;
@ -6956,10 +6955,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (numberPackets > 1)
{
if(!m_DeRezObjectDelayed.TryGetValue(id, out deRezIDs))
DeRezObjectInfo info;
if (!m_DeRezObjectDelayed.TryGetValue(id, out info))
{
deRezIDs = new List<uint>();
m_DeRezObjectDelayed[id] = deRezIDs;
info = new DeRezObjectInfo();
info.count = 0;
info.objectids = deRezIDs;
m_DeRezObjectDelayed[id] = info;
}
else
{
deRezIDs = info.objectids;
}
foreach (DeRezObjectPacket.ObjectDataBlock data in DeRezPacket.ObjectData)
@ -6967,10 +6974,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
deRezIDs.Add(data.ObjectLocalID);
}
if (curPacket < numberPackets - 1)
info.count++;
if (info.count < numberPackets)
return true;
m_DeRezObjectDelayed.Remove(id);
info.objectids = null;
}
else
{