fix underscore weapons

This commit is contained in:
Robin Appelman 2026-11-13 16:19:56 +01:00
commit b38b5773cb
Signed by: robin
SSH key fingerprint: SHA256:kifqgrqnut7q1YUIrI0AdMNC23qiKAS/T9uGFmIYvbE

View file

@ -58,7 +58,12 @@ impl Kill {
) -> Option<Self> {
let victim = event.target.id().ok()?;
// mallformed log line
if event.weapon.contains(' ') || event.weapon.chars().any(|c| !c.is_ascii_lowercase()) {
if event.weapon.contains(' ')
|| event
.weapon
.chars()
.any(|c| !(c.is_ascii_lowercase() || c == '_'))
{
return None;
}
@ -98,7 +103,7 @@ impl Kill {
}
fn add_medic_info(&mut self, event: &MedicDeathExEvent) {
self.charge = dbg!(event.charge_percentage);
self.charge = event.charge_percentage;
}
}