aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
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.Custom
parent4bba08f72314824df075387b3f8fb4450d192e5a (diff)
parent031d351db8900f5f7dc8aed0ea59e9f902667b84 (diff)
downloadNorthstarMods-695a7e279235d13590afef1531d6cd53736d947b.tar.gz
NorthstarMods-695a7e279235d13590afef1531d6cd53736d947b.zip
Merge branch 'main' of https://github.com/R2Northstar/NorthstarMods
Diffstat (limited to 'Northstar.Custom')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut5
1 files changed, 4 insertions, 1 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut
index 4d3d6612..b27892f7 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut
@@ -81,7 +81,10 @@ void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
table<int, bool> alreadyAssisted
foreach( DamageHistoryStruct attackerInfo in victim.e.recentDamageHistory )
{
- if( attackerInfo.attacker != attacker && !( attackerInfo.attacker.GetEncodedEHandle() in alreadyAssisted ) )
+ if ( !IsValid( attackerInfo.attacker ) || !attackerInfo.attacker.IsPlayer() || attackerInfo.attacker == victim )
+ continue
+
+ if ( attackerInfo.attacker != attacker && !( attackerInfo.attacker.GetEncodedEHandle() in alreadyAssisted ) )
{
if ( attackerInfo.damageSourceId != eDamageSourceId.melee_pilot_emptyhanded ) {
alreadyAssisted[attackerInfo.attacker.GetEncodedEHandle()] <- true