Skip to content

Commit

Permalink
gameplay: don't increment MvM revives stat between rounds
Browse files Browse the repository at this point in the history
when the game is not in active play, we shouldn't count any
revives. revives during this time are irrelevant and often happen
for jokes.

the revive stat also causes a revive speed penalty for each
revive done, so these irrelevant revives should not count against that.

ref: ValveSoftware/Source-1-Games#4782
  • Loading branch information
mastercoms committed Apr 11, 2023
1 parent 5f4b9e2 commit 2abe479
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/game/shared/tf/tf_revive.cpp
Expand Up @@ -384,8 +384,12 @@ bool CTFReviveMarker::ReviveOwner( void )

m_hOwner->ForceRespawn();

// Increment stat
CTF_GameStats.Event_PlayerRevived( m_hOwner );
// Don't count revives when the game isn't in active play
if ( TFGameRules()->State_Get() != GR_STATE_BETWEEN_RNDS )
{
// Increment stat
CTF_GameStats.Event_PlayerRevived( m_hOwner );
}

// If the medic's gone, or dead, stay in the spawn room
if ( !m_pReviver || !m_pReviver->IsAlive() )
Expand Down

0 comments on commit 2abe479

Please sign in to comment.