/* ===================== CG_PlayBufferedVoieChats ===================== */ void CG_PlayBufferedVoiceChats( void ) { if ( voiceChatTime < cg.time ) { if (voiceChatBufferOut != voiceChatBufferIn && voiceChatBuffer[voiceChatBufferOut].snd) { // CG_PlayVoiceChat(&voiceChatBuffer[voiceChatBufferOut]); // voiceChatBufferOut = (voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER; voiceChatTime = cg.time + 1000; } } }
/* ===================== CG_AddBufferedVoiceChat ===================== */ void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) { // if we are going into the intermission, don't start any voices if ( cg.intermissionStarted ) { return; } memcpy(&voiceChatBuffer[voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t)); voiceChatBufferIn = (voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER; if (voiceChatBufferIn == voiceChatBufferOut) { CG_PlayVoiceChat( &voiceChatBuffer[voiceChatBufferOut] ); voiceChatBufferOut++; } }
/* ===================== CG_PlayBufferedVoieChats ===================== */ void CG_PlayBufferedVoiceChats( void ) { #ifdef MISSIONPACK if ( cg.voiceChatTime < cg.time ) { if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) { // CG_PlayVoiceChat(&voiceChatBuffer[cg.voiceChatBufferOut]); // cg.voiceChatBufferOut = (cg.voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER; cg.voiceChatTime = cg.time + 1000; } } #endif }