From 2abe479421555c30e445ceb63a879429f2e1bd61 Mon Sep 17 00:00:00 2001 From: mastercoms Date: Tue, 11 Apr 2023 04:02:15 -0400 Subject: [PATCH] gameplay: don't increment MvM revives stat between rounds 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: https://github.com/ValveSoftware/Source-1-Games/issues/4782 --- src/game/shared/tf/tf_revive.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game/shared/tf/tf_revive.cpp b/src/game/shared/tf/tf_revive.cpp index b1a41e10f..26496f670 100644 --- a/src/game/shared/tf/tf_revive.cpp +++ b/src/game/shared/tf/tf_revive.cpp @@ -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() )