moved multikills to gc response, fixed multikills being incorrectly tracked

This commit is contained in:
2021-10-21 15:52:08 +02:00
parent 6aaa0f2e48
commit d9f944c3d6
2 changed files with 50 additions and 32 deletions

View File

@@ -147,7 +147,6 @@ func (p *DemoParser) parseWorker() {
continue
}
killMap := make(map[uint64]int, 10)
eqMap := make(map[uint64][]*struct {
Eq int
HitGroup int
@@ -218,26 +217,6 @@ func (p *DemoParser) parseWorker() {
Spent int
}{Round: gs.TotalRoundsPlayed(), EqV: p.EquipmentValueCurrent(), Bank: p.Money(), Spent: p.MoneySpentThisRound()})
}
// track multikills
for _, igp := range gs.Participants().Playing() {
if igp != nil && igp.SteamID64 != 0 {
killDiff := igp.Kills() - killMap[igp.SteamID64]
tPlayer := p.getMatchPlayerBySteamID(tStats, igp.SteamID64)
switch killDiff {
case 2:
tPlayer.Mk2++
case 3:
tPlayer.Mk3++
case 4:
tPlayer.Mk4++
case 5:
tPlayer.Mk5++
}
killMap[igp.SteamID64] = igp.Kills()
}
}
})
// onPlayerFlashed
@@ -336,10 +315,6 @@ func (p *DemoParser) parseWorker() {
SetUdFlash(tMatchPlayer.UdFlash).
SetUdSmoke(tMatchPlayer.UdSmoke).
SetUdFlames(tMatchPlayer.UdFlames).
SetMk2(tMatchPlayer.Mk2).
SetMk3(tMatchPlayer.Mk3).
SetMk4(tMatchPlayer.Mk4).
SetMk5(tMatchPlayer.Mk5).
SetRankOld(tMatchPlayer.RankOld).
SetRankNew(tMatchPlayer.RankNew).
SetColor(tMatchPlayer.Color).