Skip to content

Commit

Permalink
Add cg_novotebeeps cvar to enable the option to silence vote beeps.
Browse files Browse the repository at this point in the history
Add the ability to silence vote beeps separately from team vote beeps.
  • Loading branch information
cdev-tux committed Oct 30, 2017
1 parent f2c6867 commit 19ba242
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions code/cgame/cg_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,9 @@ static void CG_DrawVote(void) {
// play a talk beep whenever it is modified
if ( cgs.voteModified ) {
cgs.voteModified = qfalse;
trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND );
if ( cg_novotebeeps.integer != 1 && cg_novotebeeps.integer != 3 ) {
trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND );
}
}

sec = ( VOTE_TIME - ( cg.time - cgs.voteTime ) ) / 1000;
Expand Down Expand Up @@ -2148,7 +2150,9 @@ static void CG_DrawTeamVote(void) {
// play a talk beep whenever it is modified
if ( cgs.teamVoteModified[cs_offset] ) {
cgs.teamVoteModified[cs_offset] = qfalse;
trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND );
if ( cg_novotebeeps.integer != 2 && cg_novotebeeps.integer != 3 ) {
trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND );
}
}

sec = ( VOTE_TIME - ( cg.time - cgs.teamVoteTime[cs_offset] ) ) / 1000;
Expand Down
1 change: 1 addition & 0 deletions code/cgame/cg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ extern vmCvar_t cg_oldRocket;
extern vmCvar_t cg_oldPlasma;
extern vmCvar_t cg_trueLightning;
extern vmCvar_t cg_nochatbeeps;
extern vmCvar_t cg_novotebeeps;
#ifdef MISSIONPACK
extern vmCvar_t cg_redTeamName;
extern vmCvar_t cg_blueTeamName;
Expand Down
4 changes: 3 additions & 1 deletion code/cgame/cg_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ vmCvar_t cg_oldRocket;
vmCvar_t cg_oldPlasma;
vmCvar_t cg_trueLightning;
vmCvar_t cg_nochatbeeps;
vmCvar_t cg_novotebeeps;

#ifdef MISSIONPACK
vmCvar_t cg_redTeamName;
Expand Down Expand Up @@ -322,7 +323,8 @@ static cvarTable_t cvarTable[] = {
{ &cg_oldRocket, "cg_oldRocket", "1", CVAR_ARCHIVE},
{ &cg_oldPlasma, "cg_oldPlasma", "1", CVAR_ARCHIVE},
{ &cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE},
{ &cg_nochatbeeps, "cg_nochatbeeps", "0", CVAR_ARCHIVE}
{ &cg_nochatbeeps, "cg_nochatbeeps", "0", CVAR_ARCHIVE},
{ &cg_novotebeeps, "cg_novotebeeps", "0", CVAR_ARCHIVE}
// { &cg_pmove_fixed, "cg_pmove_fixed", "0", CVAR_USERINFO | CVAR_ARCHIVE }
};

Expand Down

0 comments on commit 19ba242

Please sign in to comment.