mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 08:31:14 +00:00
VoIP: initial shot at voice activation.
This commit is contained in:
parent
8028fc042c
commit
fec2cc2f05
4 changed files with 70 additions and 33 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue