diff options
author | Will Castro <39478251+VITALISED@users.noreply.github.com> | 2022-01-14 15:00:47 +1100 |
---|---|---|
committer | Will Castro <39478251+VITALISED@users.noreply.github.com> | 2022-01-14 15:00:47 +1100 |
commit | 358b243fe65cd319fb871c331fb359437ad1d395 (patch) | |
tree | 46366554d271a1852db18200c922c33f8926c0bc /Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut | |
parent | 8411bb9079593827b532461d205676c35fefb394 (diff) | |
download | NorthstarMods-358b243fe65cd319fb871c331fb359437ad1d395.tar.gz NorthstarMods-358b243fe65cd319fb871c331fb359437ad1d395.zip |
Fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut index 19d58a173..40300b116 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut @@ -191,13 +191,13 @@ void function ScoreEvent_TitanKilled( entity victim, entity attacker, var damage else AddPlayerScore( attacker, "KillTitan", victim.GetTitanSoul().GetOwner() ) - var existingAttackers = [] - foreach(DamageHistoryStruct attackerInfo in victim.e.recentDamageHistory) + table<int, bool> alreadyAssisted + foreach( DamageHistoryStruct attackerInfo in player.e.recentDamageHistory ) { - if( attackerInfo.attacker != attacker && !(attackerInfo.attacker in existingAttackers) ) + if( attackerInfo.attacker != attacker && !alreadyAssisted[attackerInfo.attacker.GetEncodedEHandle()] ) { + alreadyAssisted[attackerInfo.attacker.GetEncodedEHandle()] <- true AddPlayerScore(attackerInfo.attacker, "TitanAssist" ) - existingAttackers.append(attackerInfo.attacker) Remote_CallFunction_NonReplay( attackerInfo.attacker, "ServerCallback_SetAssistInformation", attackerInfo.damageSourceId, attacker.GetEncodedEHandle(), victim.GetEncodedEHandle(), attackerInfo.time ) } } |