diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-07 14:40:59 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-07 14:40:59 +0000 |
commit | e9f14bee6055b9a52b44074452f7e37b7f901ca9 (patch) | |
tree | a69c59313101692674437092fe256fa2fd1de2ac /code/client/cl_input.c | |
parent | 232f3ce4ca468acc372edae4115defdbd62cd058 (diff) | |
download | ioquake3-aero-e9f14bee6055b9a52b44074452f7e37b7f901ca9.tar.gz ioquake3-aero-e9f14bee6055b9a52b44074452f7e37b7f901ca9.zip |
VoIP: initial shot at voice activation.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1375 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client/cl_input.c')
-rw-r--r-- | code/client/cl_input.c | 21 |
1 files changed, 11 insertions, 10 deletions
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; |