added cl_chatbeep

This commit is contained in:
pierow 2018-08-17 06:45:42 -04:00
parent 85a632ec26
commit 8fe16d36ca
2 changed files with 8 additions and 2 deletions

View File

@ -141,6 +141,7 @@ cvar_t *cl_widescreen;
cvar_t *cl_ambientsound;
cvar_t *senslock;
cvar_t *hud_style;
cvar_t *cl_chatbeep;
/*
===============================================================================
@ -1552,6 +1553,7 @@ void InitInput (void)
cl_ambientsound = gEngfuncs.pfnRegisterVariable ( kvAmbientSound, "2", FCVAR_ARCHIVE);
senslock = gEngfuncs.pfnRegisterVariable ("senslock", "0", FCVAR_ARCHIVE);
hud_style = gEngfuncs.pfnRegisterVariable ("hud_style", "1", FCVAR_ARCHIVE);
cl_chatbeep = gEngfuncs.pfnRegisterVariable ("cl_chatbeep", "1", FCVAR_ARCHIVE);
// Initialize third person camera controls.
CAM_Init();

View File

@ -262,8 +262,12 @@ void CHudSayText :: SayTextPrint( const char *pszBuf, int iBufSize, int clientIn
}
m_iFlags |= HUD_ACTIVE;
//PlaySound( "misc/talk.wav", 1 );
gHUD.PlayHUDSound("misc/talk.wav", 1);
if (CVAR_GET_FLOAT("cl_chatbeep") != 0.0f)
{
//PlaySound( "misc/talk.wav", 1 );
gHUD.PlayHUDSound("misc/talk.wav", 1);
}
Y_START = ScreenHeight()*.7f;