Fix players entering enemy spawnrooms with partner taunts

ValveSoftware/Source-1-Games#3881
This commit is contained in:
Ashetf2 2025-03-10 12:00:35 -05:00 committed by GitHub
parent 0759e2e8e1
commit b95c79e1fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21567,6 +21567,18 @@ 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 )
{