/* ===================== SV_FreeClient Destructor for data allocated in a client structure ===================== */ void SV_FreeClient(client_t *client) { #ifdef USE_VOIP int index; for(index = client->queuedVoipIndex; index < client->queuedVoipPackets; index++) { index %= ARRAY_LEN(client->voipPacket); Z_Free(client->voipPacket[index]); } client->queuedVoipPackets = 0; #endif SV_Netchan_FreeQueue(client); SV_CloseDownload(client); }
/* ===================== SV_FreeClient Destructor for data allocated in a client structure ===================== */ void SV_FreeClient( client_t *client ) { // NA_BOT happens to be the default value for address types (value 0) and are // never for clients that send challenges. For NA_BOT, skip the checks for // challenges as it makes NET_CompareAdr yell at us. if (client->netchan.remoteAddress.type != netadrtype_t::NA_BOT) { // see if we already have a challenge for this IP address challenge_t* challenge = &svs.challenges[ 0 ]; for (int i = 0; i < MAX_CHALLENGES; i++, challenge++) { if ( NET_CompareAdr( client->netchan.remoteAddress, challenge->adr ) ) { challenge->connected = false; break; } } } SV_Netchan_FreeQueue( client ); SV_CloseDownload( client ); }
/* ===================== SV_FreeClient Destructor for data allocated in a client structure ===================== */ void SV_FreeClient( client_t *client ) { SV_Netchan_FreeQueue( client ); SV_CloseDownload( client ); }