From 94745d7d11ecf24a582dd8860e14eb42c170185d Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 5 Nov 2026 20:33:33 +0100 Subject: Items: log the usable ammo table once One line with each nonzero m_iAmmo type as "type:count/max" (0:270/270 8:3/3 11:5/5 ...) to diagnose any remaining "full ammo still shows" reports. --- src/esp.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/esp.cpp b/src/esp.cpp index 7ddc86b..72110cc 100644 --- a/src/esp.cpp +++ b/src/esp.cpp @@ -2933,6 +2933,20 @@ void esp_draw_items() { int vit_hp = -1, vit_max = -1, vit_armor = -1; if (g_item_usable) local_vitals(vit_hp, vit_max, vit_armor); + static bool ammo_logged = false; + if (g_item_usable && !ammo_logged) { + ammo_logged = true; + char buf[512]; + int pos = 0; + void *le = entitylist_get(local); + for (int t = 0; t < 16 && pos < 500; t++) { + int a = local_ammo(le, t); + int m = ammo_max(t); + if (a >= 0 && m > 0) + pos += snprintf(buf + pos, sizeof(buf) - pos, " %d:%d/%d", t, a, m); + } + logf("items: ammo%s", buf); + } for (int i = 0; i < g_nitems; i++) { const ItemTarget &t = g_item_targets[i]; -- cgit v1.2.3