(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 12b8822277
commit 1c3d42598e
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);
}
}