aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
diff options
context:
space:
mode:
authorWill Castro <39478251+VITALISED@users.noreply.github.com>2022-01-14 15:00:47 +1100
committerWill Castro <39478251+VITALISED@users.noreply.github.com>2022-01-14 15:00:47 +1100
commit358b243fe65cd319fb871c331fb359437ad1d395 (patch)
tree46366554d271a1852db18200c922c33f8926c0bc /Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
parent8411bb9079593827b532461d205676c35fefb394 (diff)
downloadNorthstarMods-358b243fe65cd319fb871c331fb359437ad1d395.tar.gz
NorthstarMods-358b243fe65cd319fb871c331fb359437ad1d395.zip
Fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut10
1 files changed, 5 insertions, 5 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
index 809c8886d..d3fc4c950 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut
@@ -281,14 +281,14 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga
entity attacker = DamageInfo_GetAttacker( damageInfo )
int methodOfDeath = DamageInfo_GetDamageSourceIdentifier( damageInfo )
- var existingAttackers = []
- foreach(DamageHistoryStruct attackerInfo in player.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()] )
{
- AddPlayerScore(attackerInfo.attacker, "PilotAssist" )
- existingAttackers.append(attackerInfo.attacker)
+ alreadyAssisted[attackerInfo.attacker.GetEncodedEHandle()] <- true
Remote_CallFunction_NonReplay( attackerInfo.attacker, "ServerCallback_SetAssistInformation", attackerInfo.damageSourceId, attacker.GetEncodedEHandle(), player.GetEncodedEHandle(), attackerInfo.time )
+ AddPlayerScore(attackerInfo.attacker, "PilotAssist" )
}
}