From 49ff74b3159413e76dc1c0c27bd3a0be4743d0e7 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Fri, 21 Apr 2023 12:10:47 +0200 Subject: [PATCH] add deaths_while_equipped for all routes --- src/client/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/client.ts b/src/client/client.ts index 9f666f2..f7309d1 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -114,7 +114,7 @@ router.get( if (index === 'attacker_id') data[requestIndex].username = e.attacker_name if (index === 'servername') data[requestIndex].host = e.host - if (index === 'cause_of_death') + if (index === 'cause_of_death' || (req.query.weapon && !req.query.weapon.toString().startsWith('!'))) data[requestIndex].deaths_while_equipped = Number(e.deaths_with_weapon) + (data[requestIndex].deaths_while_equipped || 0)