Skip to content

Commit

Permalink
Added sv_deadtalk
Browse files Browse the repository at this point in the history
  • Loading branch information
XutaxKamay committed Sep 14, 2024
1 parent 7759852 commit 72aea29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion game/server/basemultiplayerplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//=============================================================================

#include "cbase.h"
#include "convar.h"
#include "mp_shareddefs.h"
#include "basemultiplayerplayer.h"

Expand Down Expand Up @@ -103,6 +104,8 @@ bool CBaseMultiplayerPlayer::SpeakConceptIfAllowed( int iConcept, const char *mo
return SpeakIfAllowed( g_pszMPConcepts[iConcept], modifiers, pszOutResponseChosen, bufsize, filter );
}

ConVar sv_deadtalk("sv_deadtalk", "1");

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
Expand All @@ -121,7 +124,7 @@ bool CBaseMultiplayerPlayer::CanHearAndReadChatFrom( CBasePlayer *pPlayer )
return false;

// can't hear dead players if we're alive
if ( pPlayer->m_lifeState != LIFE_ALIVE && m_lifeState == LIFE_ALIVE )
if ( ( pPlayer->m_lifeState != LIFE_ALIVE && m_lifeState == LIFE_ALIVE ) && !sv_deadtalk.GetBool() )
return false;

return true;
Expand Down

0 comments on commit 72aea29

Please sign in to comment.