diff options
author | eihrul <eihrul> | 2007-10-14 02:09:03 +0000 |
---|---|---|
committer | eihrul <eihrul> | 2007-10-14 02:09:03 +0000 |
commit | 890e98d6a055cb6909d8b64c7af67f5bdb963f5b (patch) | |
tree | d5058bad623beb64e267bcc4565bcb4734614520 | |
parent | cc14faefab4f690157ca4deb8aae26b2ec16f65f (diff) | |
download | enet-890e98d6a055cb6909d8b64c7af67f5bdb963f5b.tar.gz enet-890e98d6a055cb6909d8b64c7af67f5bdb963f5b.zip |
*** empty log message ***
-rw-r--r-- | protocol.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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) { |