From 870779bfb0bbb798aace21a76b4fd6b28eac60d1 Mon Sep 17 00:00:00 2001 From: eihrul Date: Fri, 12 Oct 2007 02:27:45 +0000 Subject: *** empty log message *** --- peer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'peer.c') 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; -- cgit v1.2.3