From c43cb2e42a5ac1cc09f83cd72fa7e568c9ef37e1 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 6 Nov 2026 16:25:48 +0100 Subject: ESP: finish the split into entity, combat, item and projectile units esp.cpp keeps the scan and drawing (~1000 lines, down from 3665). Entity lookups and NPC classification move to entity_query.cpp together with the per-map caches and the session reset; combat (aimbot, silent aim, melee, spread, triggerbot) moves to combat.cpp. Shared helpers are declared in esp_internal.h. --- src/esp_internal.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/esp_internal.h') diff --git a/src/esp_internal.h b/src/esp_internal.h index 6e66f42..1ffdd7a 100644 --- a/src/esp_internal.h +++ b/src/esp_internal.h @@ -11,6 +11,29 @@ extern int g_scr_w, g_scr_h; +enum { LIFE_ALIVE = 0 }; +enum NpcDamageClass { + NPC_DMG_NORMAL = 0, + NPC_DMG_ARMORED, // only blast damage (RPG) hurts it + NPC_DMG_VULNERABLE, // gravity gun / physics damage works well + NPC_DMG_IMMUNE // m_takedamage says no damage at all +}; + +bool is_npc_class(const char *name); +bool npc_is_friendly(int idx, const char *model, int local_idx, bool &neutral); +bool npc_can_be_damaged(int idx, const char *model); +int npc_damage_class(int idx, const char *model); +QAngle angle_to(const Vector &from, const Vector &to); +bool punch_angles(float &px, float &py); +int entptr_lookup(void *ent); +void entptr_store(void *ent, int idx); +void weapon_short_name(int idx, char *out, size_t outn); +void short_name(const char *model, char *out, size_t outn); + +// Listen-server sanity latch, shared with esp_collect(). +extern bool g_srv_checked; +extern bool g_srv_trusted; + double esp_now(); bool esp_update_screen(); -- cgit v1.2.3