aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
diff options
context:
space:
mode:
authorWill Castro <39478251+VITALISED@users.noreply.github.com>2022-01-10 20:38:50 +1100
committerWill Castro <39478251+VITALISED@users.noreply.github.com>2022-01-10 20:38:50 +1100
commitaf2f675a13c1e82fc4900bd61aadc88facd4775a (patch)
treed2bb2463e38a91b74f6cafddcf5f7412959dc7fb /Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
parent62ff78cefebfb2c525adea2bd11deba664fc04f3 (diff)
downloadNorthstarMods-af2f675a13c1e82fc4900bd61aadc88facd4775a.tar.gz
NorthstarMods-af2f675a13c1e82fc4900bd61aadc88facd4775a.zip
Add assist medals and scoring
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut11
1 files changed, 11 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
index 002b13312..19d58a173 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
@@ -190,6 +190,17 @@ void function ScoreEvent_TitanKilled( entity victim, entity attacker, var damage
AddPlayerScore( attacker, "TitanKillTitan", victim.GetTitanSoul().GetOwner() )
else
AddPlayerScore( attacker, "KillTitan", victim.GetTitanSoul().GetOwner() )
+
+ var existingAttackers = []
+ foreach(DamageHistoryStruct attackerInfo in victim.e.recentDamageHistory)
+ {
+ if( attackerInfo.attacker != attacker && !(attackerInfo.attacker in existingAttackers) )
+ {
+ AddPlayerScore(attackerInfo.attacker, "TitanAssist" )
+ existingAttackers.append(attackerInfo.attacker)
+ Remote_CallFunction_NonReplay( attackerInfo.attacker, "ServerCallback_SetAssistInformation", attackerInfo.damageSourceId, attacker.GetEncodedEHandle(), victim.GetEncodedEHandle(), attackerInfo.time )
+ }
+ }
}
void function ScoreEvent_NPCKilled( entity victim, entity attacker, var damageInfo )