diff --git a/src/game/client/hud_basechat.cpp b/src/game/client/hud_basechat.cpp index cc17aa80b21..5020e960464 100644 --- a/src/game/client/hud_basechat.cpp +++ b/src/game/client/hud_basechat.cpp @@ -39,6 +39,7 @@ ConVar cl_showtextmsg( "cl_showtextmsg", "1", 0, "Enable/disable text messages p ConVar cl_chatfilters( "cl_chatfilters", "63", FCVAR_CLIENTDLL | FCVAR_ARCHIVE, "Stores the chat filter settings " ); ConVar cl_chatfilter_version( "cl_chatfilter_version", "0", FCVAR_CLIENTDLL | FCVAR_ARCHIVE | FCVAR_HIDDEN, "Stores the chat filter version" ); ConVar cl_mute_all_comms("cl_mute_all_comms", "1", FCVAR_ARCHIVE, "If 1, then all communications from a player will be blocked when that player is muted, including chat messages."); +ConVar cl_mute_voice_commands_text("cl_mute_voice_commands_text", "0", FCVAR_ARCHIVE, "Disable voice commands being printed in chat. 0 = All voice commands get printed, 1 = No voice commands get printed, 2 = Only allow MEDIC! and Spy! calls to be printed."); ConVar cl_enable_text_chat( "cl_enable_text_chat", "1", FCVAR_ARCHIVE, "Enable text chat in this game" ); const int kChatFilterVersion = 1; @@ -964,6 +965,9 @@ void CBaseHudChat::MsgFunc_VoiceSubtitle( bf_read &msg ) if ( !cl_showtextmsg.GetInt() ) return; + if ( cl_mute_voice_commands_text.GetInt() == 1 ) + return; + char szString[2048]; char szPrefix[64]; //(Voice) wchar_t szBuf[128]; @@ -972,6 +976,9 @@ void CBaseHudChat::MsgFunc_VoiceSubtitle( bf_read &msg ) int iMenu = msg.ReadByte(); int iItem = msg.ReadByte(); + if (cl_mute_voice_commands_text.GetInt() == 2 && ((iMenu != 0 || iItem != 0) || (iMenu != 1 || iItem != 1))) + return; + const char *pszSubtitle = ""; CGameRules *pGameRules = GameRules(); @@ -1869,4 +1876,4 @@ void CBaseHudChat::FireGameEvent( IGameEvent *event ) ChatPrintf( player->entindex(), CHAT_FILTER_NONE, "(SourceTV) %s", event->GetString( "text" ) ); } #endif -} \ No newline at end of file +}