1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00

Sync with upstream (Issue #30).

Recompiled tier1 and mathlib  for all platforms will come in next commit.
This commit is contained in:
Nicholas Hastings
2016-11-30 10:01:15 -05:00
parent 98fe5b5a34
commit 3957adff10
491 changed files with 29846 additions and 10698 deletions

View File

@ -24,6 +24,7 @@
#include "vgui/IInput.h"
#include "vgui/ILocalize.h"
#include "multiplay_gamerules.h"
#include "voice_status.h"
// memdbgon must be the last include file in a .cpp file!!!
@ -36,6 +37,7 @@ ConVar hud_saytext_time( "hud_saytext_time", "12", 0 );
ConVar cl_showtextmsg( "cl_showtextmsg", "1", 0, "Enable/disable text messages printing on the screen." );
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.");
const int kChatFilterVersion = 1;
@ -1750,6 +1752,13 @@ void CBaseHudChat::ChatPrintf( int iPlayerIndex, int iFilter, const char *fmt, .
return;
}
// If a player is muted for voice, also mute them for text because jerks gonna jerk.
if ( cl_mute_all_comms.GetBool() && iPlayerIndex != 0 )
{
if ( GetClientVoiceMgr() && GetClientVoiceMgr()->IsPlayerBlocked( iPlayerIndex ) )
return;
}
if ( *pmsg < 32 )
{
hudlcd->AddChatLine( pmsg + 1 );