aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-02-16 20:50:56 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-02-16 20:50:56 +0000
commit695a7e279235d13590afef1531d6cd53736d947b (patch)
treee49a206928c660701f87cd401c1a0d8792df88fd /Northstar.CustomServers/mod/scripts/vscripts/gamemodes
parent4bba08f72314824df075387b3f8fb4450d192e5a (diff)
parent031d351db8900f5f7dc8aed0ea59e9f902667b84 (diff)
downloadNorthstarMods-695a7e279235d13590afef1531d6cd53736d947b.tar.gz
NorthstarMods-695a7e279235d13590afef1531d6cd53736d947b.zip
Merge branch 'main' of https://github.com/R2Northstar/NorthstarMods
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut3
1 files changed, 3 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut
index a3ea5172..962549b4 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut
@@ -16,6 +16,9 @@ void function GiveScoreForPlayerKill( entity victim, entity attacker, var damage
table<int, bool> alreadyAssisted
foreach( DamageHistoryStruct attackerInfo in victim.e.recentDamageHistory )
{
+ if ( !IsValid( attackerInfo.attacker ) || !attackerInfo.attacker.IsPlayer() || attackerInfo.attacker == victim )
+ continue
+
bool exists = attackerInfo.attacker.GetEncodedEHandle() in alreadyAssisted ? true : false
if( attackerInfo.attacker != attacker && !exists )
{