mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-11-30 04:40:47 +01:00
better medic class tracking
This commit is contained in:
parent
f5121a75c3
commit
2bb871a269
1 changed files with 3 additions and 0 deletions
|
|
@ -114,10 +114,12 @@ impl Kill {
|
|||
if event.charge == Some(1) {
|
||||
self.charge = Some(100);
|
||||
}
|
||||
self.victim.class = Class::Medic;
|
||||
}
|
||||
|
||||
fn add_medic_info_ex(&mut self, event: &MedicDeathExEvent) {
|
||||
self.charge = event.charge_percentage;
|
||||
self.victim.class = Class::Medic;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -281,6 +283,7 @@ impl GlobalData for Kills {
|
|||
if let (Some(kill), Some(victim)) = (self.kills.last_mut(), subject.steam_id()) {
|
||||
if kill.time == time && kill.victim.id == victim {
|
||||
kill.add_medic_info(event);
|
||||
self.classes.insert(kill.victim.subject(), Class::Medic);
|
||||
} else {
|
||||
self.early_data_mut(time, victim).medic = Some(event.clone());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue