Merge pull request #25 from ENSL/pierow-fixes

added cl_chatbeep
This commit is contained in:
pierow 2018-08-17 06:55:35 -04:00 committed by GitHub
commit 550f125af8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;