change HandlerDeRezObject again to account for out or order packets
parent
dc9f0d3627
commit
28366f789e
|
@ -6926,8 +6926,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint m_DeRezObjectLasSeq = 0;
|
private class DeRezObjectInfo
|
||||||
Dictionary<UUID, List<uint>> m_DeRezObjectDelayed = new Dictionary<UUID, List<uint>>();
|
{
|
||||||
|
public int count;
|
||||||
|
public List<uint> objectids;
|
||||||
|
}
|
||||||
|
private Dictionary<UUID, DeRezObjectInfo> m_DeRezObjectDelayed = new Dictionary<UUID, DeRezObjectInfo>();
|
||||||
|
|
||||||
private bool HandlerDeRezObject(IClientAPI sender, Packet Pack)
|
private bool HandlerDeRezObject(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
|
@ -6943,23 +6947,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return true;
|
return true;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
uint seq = DeRezPacket.Header.Sequence;
|
|
||||||
if(seq <= m_DeRezObjectLasSeq)
|
|
||||||
return true;
|
|
||||||
m_DeRezObjectLasSeq = seq;
|
|
||||||
|
|
||||||
List<uint> deRezIDs;
|
List<uint> deRezIDs;
|
||||||
DeRezAction action = (DeRezAction)DeRezPacket.AgentBlock.Destination;
|
DeRezAction action = (DeRezAction)DeRezPacket.AgentBlock.Destination;
|
||||||
int numberPackets = DeRezPacket.AgentBlock.PacketCount;
|
int numberPackets = DeRezPacket.AgentBlock.PacketCount;
|
||||||
int curPacket = DeRezPacket.AgentBlock.PacketNumber;
|
int curPacket = DeRezPacket.AgentBlock.PacketNumber;
|
||||||
UUID id = DeRezPacket.AgentBlock.TransactionID;
|
UUID id = DeRezPacket.AgentBlock.TransactionID;
|
||||||
|
|
||||||
if (numberPackets > 1)
|
if (numberPackets > 1)
|
||||||
{
|
{
|
||||||
if(!m_DeRezObjectDelayed.TryGetValue(id, out deRezIDs))
|
DeRezObjectInfo info;
|
||||||
|
if (!m_DeRezObjectDelayed.TryGetValue(id, out info))
|
||||||
{
|
{
|
||||||
deRezIDs = new List<uint>();
|
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)
|
foreach (DeRezObjectPacket.ObjectDataBlock data in DeRezPacket.ObjectData)
|
||||||
|
@ -6967,10 +6974,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
deRezIDs.Add(data.ObjectLocalID);
|
deRezIDs.Add(data.ObjectLocalID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curPacket < numberPackets - 1)
|
info.count++;
|
||||||
|
if (info.count < numberPackets)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
m_DeRezObjectDelayed.Remove(id);
|
m_DeRezObjectDelayed.Remove(id);
|
||||||
|
info.objectids = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue