mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
avoid sending packets in unacknowledged window
This commit is contained in:
parent
0d1fb32ee8
commit
4de13a2c2e
1 changed files with 2 additions and 2 deletions
|
@ -1411,8 +1411,8 @@ enet_protocol_check_outgoing_commands (ENetHost * host, ENetPeer * peer)
|
||||||
outgoingCommand -> sendAttempts < 1 &&
|
outgoingCommand -> sendAttempts < 1 &&
|
||||||
! (outgoingCommand -> reliableSequenceNumber % ENET_PEER_RELIABLE_WINDOW_SIZE) &&
|
! (outgoingCommand -> reliableSequenceNumber % ENET_PEER_RELIABLE_WINDOW_SIZE) &&
|
||||||
(channel -> reliableWindows [(reliableWindow + ENET_PEER_RELIABLE_WINDOWS - 1) % ENET_PEER_RELIABLE_WINDOWS] >= ENET_PEER_RELIABLE_WINDOW_SIZE ||
|
(channel -> reliableWindows [(reliableWindow + ENET_PEER_RELIABLE_WINDOWS - 1) % ENET_PEER_RELIABLE_WINDOWS] >= ENET_PEER_RELIABLE_WINDOW_SIZE ||
|
||||||
channel -> usedReliableWindows & ((((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 1)) - 1) << reliableWindow) |
|
channel -> usedReliableWindows & ((((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 2)) - 1) << reliableWindow) |
|
||||||
(((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 1)) - 1) >> (ENET_PEER_RELIABLE_WINDOWS - reliableWindow)))))
|
(((1 << (ENET_PEER_FREE_RELIABLE_WINDOWS + 2)) - 1) >> (ENET_PEER_RELIABLE_WINDOWS - reliableWindow)))))
|
||||||
windowWrap = 1;
|
windowWrap = 1;
|
||||||
if (windowWrap)
|
if (windowWrap)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue