(svn r20510) -Codechange: unify packet queue handling and make insertion O(1) instead of O(n)

This commit is contained in:
rubidium
2010-08-15 23:44:45 +00:00
parent 55427e4062
commit 6f81fa7215
4 changed files with 72 additions and 36 deletions

View File

@@ -1618,11 +1618,8 @@ void NetworkServer_ReadPackets(NetworkClientSocket *cs)
static void NetworkHandleCommandQueue(NetworkClientSocket *cs)
{
CommandPacket *cp;
while ( (cp = cs->command_queue) != NULL) {
while ((cp = cs->command_queue.Pop()) != NULL) {
SEND_COMMAND(PACKET_SERVER_COMMAND)(cs, cp);
cs->command_queue = cp->next;
free(cp);
}
}