|
@@ -268,7 +268,7 @@ enet_peer_reset_outgoing_commands (ENetList * queue)
|
|
|
}
|
|
|
|
|
|
static void
|
|
|
-enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startCommand, ENetListIterator endCommand)
|
|
|
+enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startCommand, ENetListIterator endCommand, ENetIncomingCommand * excludeCommand)
|
|
|
{
|
|
|
ENetListIterator currentCommand;
|
|
|
|
|
@@ -278,6 +278,9 @@ enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startComm
|
|
|
|
|
|
currentCommand = enet_list_next (currentCommand);
|
|
|
|
|
|
+ if (incomingCommand == excludeCommand)
|
|
|
+ continue;
|
|
|
+
|
|
|
enet_list_remove (& incomingCommand -> incomingCommandList);
|
|
|
|
|
|
if (incomingCommand -> packet != NULL)
|
|
@@ -298,7 +301,7 @@ enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startComm
|
|
|
static void
|
|
|
enet_peer_reset_incoming_commands (ENetList * queue)
|
|
|
{
|
|
|
- enet_peer_remove_incoming_commands(queue, enet_list_begin (queue), enet_list_end (queue));
|
|
|
+ enet_peer_remove_incoming_commands(queue, enet_list_begin (queue), enet_list_end (queue), NULL);
|
|
|
}
|
|
|
|
|
|
void
|
|
@@ -697,7 +700,7 @@ enet_peer_queue_outgoing_command (ENetPeer * peer, const ENetProtocol * command,
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel * channel)
|
|
|
+enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel * channel, ENetIncomingCommand * queuedCommand)
|
|
|
{
|
|
|
ENetListIterator droppedCommand, startCommand, currentCommand;
|
|
|
|
|
@@ -776,11 +779,11 @@ enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel *
|
|
|
droppedCommand = currentCommand;
|
|
|
}
|
|
|
|
|
|
- enet_peer_remove_incoming_commands (& channel -> incomingUnreliableCommands, enet_list_begin (& channel -> incomingUnreliableCommands), droppedCommand);
|
|
|
+ enet_peer_remove_incoming_commands (& channel -> incomingUnreliableCommands, enet_list_begin (& channel -> incomingUnreliableCommands), droppedCommand, queuedCommand);
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-enet_peer_dispatch_incoming_reliable_commands (ENetPeer * peer, ENetChannel * channel)
|
|
|
+enet_peer_dispatch_incoming_reliable_commands (ENetPeer * peer, ENetChannel * channel, ENetIncomingCommand * queuedCommand)
|
|
|
{
|
|
|
ENetListIterator currentCommand;
|
|
|
|
|
@@ -815,7 +818,7 @@ enet_peer_dispatch_incoming_reliable_commands (ENetPeer * peer, ENetChannel * ch
|
|
|
}
|
|
|
|
|
|
if (! enet_list_empty (& channel -> incomingUnreliableCommands))
|
|
|
- enet_peer_dispatch_incoming_unreliable_commands (peer, channel);
|
|
|
+ enet_peer_dispatch_incoming_unreliable_commands (peer, channel, queuedCommand);
|
|
|
}
|
|
|
|
|
|
ENetIncomingCommand *
|
|
@@ -973,11 +976,11 @@ enet_peer_queue_incoming_command (ENetPeer * peer, const ENetProtocol * command,
|
|
|
{
|
|
|
case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT:
|
|
|
case ENET_PROTOCOL_COMMAND_SEND_RELIABLE:
|
|
|
- enet_peer_dispatch_incoming_reliable_commands (peer, channel);
|
|
|
+ enet_peer_dispatch_incoming_reliable_commands (peer, channel, incomingCommand);
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
- enet_peer_dispatch_incoming_unreliable_commands (peer, channel);
|
|
|
+ enet_peer_dispatch_incoming_unreliable_commands (peer, channel, incomingCommand);
|
|
|
break;
|
|
|
}
|
|
|
|