summaryrefslogtreecommitdiffstats
path: root/src/esp_internal.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-06 16:25:48 +0100
committersalmonik <salmonik@tuta.io>2026-11-06 16:25:48 +0100
commitc43cb2e42a5ac1cc09f83cd72fa7e568c9ef37e1 (patch)
tree2da18f9d243d898fb218f36a4508e0d309782d5e /src/esp_internal.h
parentESP: extract item ESP into its own translation unit (diff)
downloadhl2h-c43cb2e42a5ac1cc09f83cd72fa7e568c9ef37e1.tar.gz
hl2h-c43cb2e42a5ac1cc09f83cd72fa7e568c9ef37e1.zip
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.
Diffstat (limited to 'src/esp_internal.h')
-rw-r--r--src/esp_internal.h23
1 files changed, 23 insertions, 0 deletions
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 @@
11 11
12extern int g_scr_w, g_scr_h; 12extern int g_scr_w, g_scr_h;
13 13
14enum { LIFE_ALIVE = 0 };
15enum NpcDamageClass {
16 NPC_DMG_NORMAL = 0,
17 NPC_DMG_ARMORED, // only blast damage (RPG) hurts it
18 NPC_DMG_VULNERABLE, // gravity gun / physics damage works well
19 NPC_DMG_IMMUNE // m_takedamage says no damage at all
20};
21
22bool is_npc_class(const char *name);
23bool npc_is_friendly(int idx, const char *model, int local_idx, bool &neutral);
24bool npc_can_be_damaged(int idx, const char *model);
25int npc_damage_class(int idx, const char *model);
26QAngle angle_to(const Vector &from, const Vector &to);
27bool punch_angles(float &px, float &py);
28int entptr_lookup(void *ent);
29void entptr_store(void *ent, int idx);
30void weapon_short_name(int idx, char *out, size_t outn);
31void short_name(const char *model, char *out, size_t outn);
32
33// Listen-server sanity latch, shared with esp_collect().
34extern bool g_srv_checked;
35extern bool g_srv_trusted;
36
14double esp_now(); 37double esp_now();
15bool esp_update_screen(); 38bool esp_update_screen();
16 39