From e9f14bee6055b9a52b44074452f7e37b7f901ca9 Mon Sep 17 00:00:00 2001 From: icculus Date: Sat, 7 Jun 2008 14:40:59 +0000 Subject: VoIP: initial shot at voice activation. git-svn-id: svn://svn.icculus.org/quake3/trunk@1375 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_input.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'code/client/cl_input.c') diff --git a/code/client/cl_input.c b/code/client/cl_input.c index e2ee6f6..5eab1a2 100644 --- a/code/client/cl_input.c +++ b/code/client/cl_input.c @@ -221,8 +221,17 @@ void IN_StrafeDown(void) {IN_KeyDown(&in_strafe);} void IN_StrafeUp(void) {IN_KeyUp(&in_strafe);} #if USE_VOIP -void IN_VoipRecordDown(void) {IN_KeyDown(&in_voiprecord);} -void IN_VoipRecordUp(void) {IN_KeyUp(&in_voiprecord);} +void IN_VoipRecordDown(void) +{ + IN_KeyDown(&in_voiprecord); + Cvar_Set("cl_voipSend", "1"); +} + +void IN_VoipRecordUp(void) +{ + IN_KeyUp(&in_voiprecord); + Cvar_Set("cl_voipSend", "0"); +} #endif void IN_Button0Down(void) {IN_KeyDown(&in_buttons[0]);} @@ -556,14 +565,6 @@ usercmd_t CL_CreateCmd( void ) { // get basic movement from joystick CL_JoystickMove( &cmd ); -#if USE_VOIP - if ( ( in_voiprecord.active ) && ( !cl_voipSend->integer ) ) { - Cvar_Set("cl_voipSend", "1"); - } else if ( ( !in_voiprecord.active ) && ( cl_voipSend->integer ) ) { - Cvar_Set("cl_voipSend", "0"); - } -#endif - // check to make sure the angles haven't wrapped if ( cl.viewangles[PITCH] - oldAngles[PITCH] > 90 ) { cl.viewangles[PITCH] = oldAngles[PITCH] + 90; -- cgit v1.2.3