From 8b52a0a2ec5116fd44ffa00f95bf99113a93d399 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 21:27:04 +0100 Subject: Item ESP: tag breakable wood/plastic/metal crates --- src/esp.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/esp.cpp') diff --git a/src/esp.cpp b/src/esp.cpp index d10a2cf..0d64c78 100644 --- a/src/esp.cpp +++ b/src/esp.cpp @@ -1371,6 +1371,10 @@ static int classify_item(const char *model, const char *cls, char *label, if (!model && !cls) return -1; + // Breakable prop chunks are debris, not pickups. + if (item_icontains(model, "chunk")) + return -1; + if (item_icontains(model, "healthkit")) { snprintf(label, outn, "Medkit"); return IK_HEALTH; @@ -1408,6 +1412,11 @@ static int classify_item(const char *model, const char *cls, char *label, snprintf(label, outn, "Ammo crate"); return IK_AMMO; } + // Generic breakable crates (wood/plastic/metal) are supply caches too. + if (item_icontains(model, "crate")) { + snprintf(label, outn, "Crate"); + return IK_CRATE; + } if (item_icontains(model, "w_missile_closed")) { snprintf(label, outn, "RPG ammo"); return IK_AMMO; @@ -1447,6 +1456,10 @@ static int classify_item(const char *model, const char *cls, char *label, snprintf(label, outn, "Ammo"); return IK_AMMO; } + if (item_icontains(cls, "crate")) { + snprintf(label, outn, "Crate"); + return IK_CRATE; + } if (item_icontains(cls, "item") || item_icontains(cls, "pickup")) { snprintf(label, outn, "Item"); return IK_OTHER; -- cgit v1.2.3