From 890e98d6a055cb6909d8b64c7af67f5bdb963f5b Mon Sep 17 00:00:00 2001 From: eihrul Date: Sun, 14 Oct 2007 02:09:03 +0000 Subject: *** empty log message *** --- protocol.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'protocol.c') diff --git a/protocol.c b/protocol.c index 5fccb4c..d8281f0 100644 --- a/protocol.c +++ b/protocol.c @@ -176,7 +176,23 @@ enet_protocol_remove_sent_reliable_command (ENetPeer * peer, enet_uint16 reliabl } if (currentCommand == enet_list_end (& peer -> sentReliableCommands)) - return ENET_PROTOCOL_COMMAND_NONE; + { + for (currentCommand = enet_list_begin (& peer -> outgoingReliableCommands); + currentCommand != enet_list_end (& peer -> outgoingReliableCommands); + currentCommand = enet_list_next (currentCommand)) + { + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + + if (outgoingCommand -> sendAttempts < 1) return ENET_PROTOCOL_COMMAND_NONE; + + if (outgoingCommand -> reliableSequenceNumber == reliableSequenceNumber && + outgoingCommand -> command.header.channelID == channelID) + break; + } + + if (currentCommand == enet_list_end (& peer -> outgoingReliableCommands)) + return ENET_PROTOCOL_COMMAND_NONE; + } if (channelID < peer -> channelCount) { -- cgit v1.2.3