diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2024-08-30 15:25:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 15:25:54 +0200 |
commit | ebbf9df5134d75c7d46bca0826cfee47090d8215 (patch) | |
tree | 6f3838a9010875e9141bf6cb0415ab9c1d5c9a5b | |
parent | 9e9d08ff8ba0c85b90590f17cb9be38cba4f6450 (diff) | |
download | NorthstarMods-1.27.5-rc2.tar.gz NorthstarMods-1.27.5-rc2.zip |
Add missing `IsValidPlayer()` check for CTF capture assists (#854)v1.27.5-rc2v1.27.5
Co-authored-by: Zanieon <william-millennium@hotmail.com>
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut index 3c5eb12c..31c05eb3 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut @@ -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 ) + } } } |