From eb637d9e8ddd8dd26dbc899ce7f90759050b1357 Mon Sep 17 00:00:00 2001 From: Ashetf2 <63692647+Ashetf2@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:50:56 -0500 Subject: [PATCH] Fix players entering enemy spawnrooms with partner taunts https://github.com/ValveSoftware/Source-1-Games/issues/3881 --- src/game/server/tf/tf_player.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/game/server/tf/tf_player.cpp b/src/game/server/tf/tf_player.cpp index 16cee6ab2cc..08fc59edf52 100644 --- a/src/game/server/tf/tf_player.cpp +++ b/src/game/server/tf/tf_player.cpp @@ -21763,6 +21763,17 @@ CTFPlayer *CTFPlayer::FindPartnerTauntInitiator( void ) continue; } + // Check if: 1. the initiator is inside a respawnroom and 2. the round has not ended, to not execute when players can already enter the enemy respawnroom + // This should be an easy way to fix players entering spawnrooms with partner taunts + if( PointInRespawnRoom( pPlayer, pPlayer->WorldSpaceCenter() ) && TFGameRules()->State_Get() != GR_STATE_TEAM_WIN) + { + if ( tf_highfive_debug.GetBool() ) + Msg( " - but %s is inside their spawn room and the round hasn't ended.\n", pPlayer->GetPlayerName() ); + + //no trolling + continue; + } + // update to closer target player if ( flDistSqrToPlayer < flDistSqrToTargetInitiator ) {