From 8fe16d36ca661a09b081b33cef228e7ea9bf0cab Mon Sep 17 00:00:00 2001 From: pierow Date: Fri, 17 Aug 2018 06:45:42 -0400 Subject: [PATCH] added cl_chatbeep --- main/source/cl_dll/input.cpp | 2 ++ main/source/cl_dll/saytext.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/main/source/cl_dll/input.cpp b/main/source/cl_dll/input.cpp index dcfb233a..2ff5b72c 100644 --- a/main/source/cl_dll/input.cpp +++ b/main/source/cl_dll/input.cpp @@ -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(); diff --git a/main/source/cl_dll/saytext.cpp b/main/source/cl_dll/saytext.cpp index 973d2b14..bb26165f 100644 --- a/main/source/cl_dll/saytext.cpp +++ b/main/source/cl_dll/saytext.cpp @@ -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;