コード例 #1
0
ファイル: cg_servercmds.c プロジェクト: linux26/corkscrew
/*
=====================
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;
		}
	}
}
コード例 #2
0
ファイル: cg_servercmds.c プロジェクト: linux26/corkscrew
/*
=====================
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++;
	}
}
コード例 #3
0
/*
=====================
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
}