fixed responses

This commit is contained in:
2021-10-13 16:15:58 +02:00
parent 4b7851da83
commit c35df3a8b5
2 changed files with 36 additions and 3 deletions

View File

@@ -159,6 +159,13 @@ func (p *DemoParser) parseWorker() {
return
}
tAttacker := p.getMatchPlayerBySteamID(tStats, e.Attacker.SteamID64)
if e.Attacker.Team == e.Player.Team {
tAttacker.DmgTeam += uint(e.HealthDamageTaken)
} else {
tAttacker.DmgEnemy += uint(e.HealthDamageTaken)
}
if _, ok := eqMap[e.Attacker.SteamID64]; !ok {
eqMap[e.Attacker.SteamID64] = make([]*struct {
Eq int
@@ -311,6 +318,22 @@ 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).
SetCrosshair(tMatchPlayer.Crosshair).
SetFlashDurationTeam(tMatchPlayer.FlashDurationTeam).
SetFlashDurationSelf(tMatchPlayer.FlashDurationSelf).
SetFlashDurationEnemy(tMatchPlayer.FlashDurationEnemy).
SetFlashTotalEnemy(tMatchPlayer.FlashTotalEnemy).
SetFlashTotalSelf(tMatchPlayer.FlashTotalSelf).
SetFlashTotalTeam(tMatchPlayer.FlashTotalTeam).
SetDmgTeam(tMatchPlayer.DmgTeam).
SetDmgEnemy(tMatchPlayer.DmgEnemy).
Save(context.Background())
p.lock.Unlock()
if err != nil {