Explorar o código

possible fix for unsequenced packets

eihrul %!s(int64=20) %!d(string=hai) anos
pai
achega
d381b4b7af
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      peer.c

+ 3 - 1
peer.c

@@ -517,7 +517,9 @@ enet_peer_queue_outgoing_command (ENetPeer * peer, const ENetProtocol * command,
     else
     if (command -> header.flags & ENET_PROTOCOL_FLAG_UNSEQUENCED)
     {
-       outgoingCommand -> reliableSequenceNumber = channel -> outgoingReliableSequenceNumber;
+       ++ channel -> outgoingUnsequencedGroup;
+
+       outgoingCommand -> reliableSequenceNumber = 0;
        outgoingCommand -> unreliableSequenceNumber = 0;
     }
     else