aboutsummaryrefslogtreecommitdiffhomepage
path: root/peer.c
diff options
context:
space:
mode:
authoreihrul <eihrul>2007-10-12 02:27:45 +0000
committereihrul <eihrul>2007-10-12 02:27:45 +0000
commit870779bfb0bbb798aace21a76b4fd6b28eac60d1 (patch)
treea55e3a923f4aec2089bac588be991c9147264da3 /peer.c
parentf4d0dc72926f8eab910d19af3cd59aa60e7ce8e7 (diff)
downloadenet-870779bfb0bbb798aace21a76b4fd6b28eac60d1.tar.gz
enet-870779bfb0bbb798aace21a76b4fd6b28eac60d1.zip
*** empty log message ***
Diffstat (limited to 'peer.c')
-rw-r--r--peer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/peer.c b/peer.c
index 50df774..e144642 100644
--- a/peer.c
+++ b/peer.c
@@ -145,6 +145,9 @@ enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet)
command.header.channelID = channelID;
+ if (! (packet -> flags & (ENET_PACKET_FLAG_RELIABLE | ENET_PACKET_FLAG_UNSEQUENCED)) && channel -> outgoingUnreliableSequenceNumber >= 0xFFFF)
+ packet -> flags |= ENET_PACKET_FLAG_RELIABLE;
+
if (packet -> flags & ENET_PACKET_FLAG_RELIABLE)
{
command.header.command = ENET_PROTOCOL_COMMAND_SEND_RELIABLE | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE;
@@ -525,6 +528,7 @@ enet_peer_queue_outgoing_command (ENetPeer * peer, const ENetProtocol * command,
outgoingCommand -> unreliableSequenceNumber = channel -> outgoingUnreliableSequenceNumber;
}
+ outgoingCommand -> sendAttempts = 0;
outgoingCommand -> sentTime = 0;
outgoingCommand -> roundTripTimeout = 0;
outgoingCommand -> roundTripTimeoutLimit = 0;