Skip to content

Commit

Permalink
Add missing IsValidPlayer() check for CTF capture assists (#854)
Browse files Browse the repository at this point in the history
Co-authored-by: Zanieon <[email protected]>
  • Loading branch information
GeckoEidechse and Zanieon authored Aug 30, 2024
1 parent 9e9d08f commit ebbf9df
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,15 @@ void function CaptureFlag( entity player, entity flag )

foreach( entity assistPlayer in assistList )
{
if ( player != assistPlayer )
AddPlayerScore( assistPlayer, "FlagCaptureAssist", player )
if( !HasPlayerCompletedMeritScore( assistPlayer ) )
if ( IsValidPlayer( assistPlayer ) )
{
AddPlayerScore( assistPlayer, "ChallengeCTFCapAssist" )
SetPlayerChallengeMeritScore( assistPlayer )
if ( player != assistPlayer )
AddPlayerScore( assistPlayer, "FlagCaptureAssist", player )
if( !HasPlayerCompletedMeritScore( assistPlayer ) )
{
AddPlayerScore( assistPlayer, "ChallengeCTFCapAssist" )
SetPlayerChallengeMeritScore( assistPlayer )
}
}
}

Expand Down

0 comments on commit ebbf9df

Please sign in to comment.