aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2024-08-30 15:25:54 +0200
committerGitHub <noreply@github.com>2024-08-30 15:25:54 +0200
commitebbf9df5134d75c7d46bca0826cfee47090d8215 (patch)
tree6f3838a9010875e9141bf6cb0415ab9c1d5c9a5b /Northstar.CustomServers/mod/scripts/vscripts/gamemodes
parent9e9d08ff8ba0c85b90590f17cb9be38cba4f6450 (diff)
downloadNorthstarMods-1.27.5.tar.gz
NorthstarMods-1.27.5.zip
Add missing `IsValidPlayer()` check for CTF capture assists (#854)v1.27.5-rc2v1.27.5
Co-authored-by: Zanieon <william-millennium@hotmail.com>
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut13
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 )
+ }
}
}