Try to fix the ancient package queue desync problem
This commit is contained in:
parent
e3dfb3aa61
commit
edd6e1def3
@ -86,8 +86,8 @@ namespace NeonTea.Quakeball.TeaNet.Peers {
|
|||||||
Protocol protocol = Peer.GetProtocol(conn.Internal.AssignedProtocol);
|
Protocol protocol = Peer.GetProtocol(conn.Internal.AssignedProtocol);
|
||||||
if (protocol != null && conn.IsReady()) {
|
if (protocol != null && conn.IsReady()) {
|
||||||
ByteBuffer buffer = protocol.BuildMessage(conn);
|
ByteBuffer buffer = protocol.BuildMessage(conn);
|
||||||
List<Packet> list = PacketQueue[uid];
|
Packet[] list = PacketQueue[uid].ToArray();
|
||||||
buffer.Write(list.Count);
|
buffer.Write(list.Length);
|
||||||
foreach (Packet p in list) {
|
foreach (Packet p in list) {
|
||||||
buffer.WritePacket(protocol, p);
|
buffer.WritePacket(protocol, p);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user