diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-06 16:25:48 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-06 16:25:48 +0100 |
| commit | c43cb2e42a5ac1cc09f83cd72fa7e568c9ef37e1 (patch) | |
| tree | 2da18f9d243d898fb218f36a4508e0d309782d5e /src/esp_internal.h | |
| parent | ESP: extract item ESP into its own translation unit (diff) | |
| download | hl2h-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.h | 23 |
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 | ||
| 12 | extern int g_scr_w, g_scr_h; | 12 | extern int g_scr_w, g_scr_h; |
| 13 | 13 | ||
| 14 | enum { LIFE_ALIVE = 0 }; | ||
| 15 | enum 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 | |||
| 22 | bool is_npc_class(const char *name); | ||
| 23 | bool npc_is_friendly(int idx, const char *model, int local_idx, bool &neutral); | ||
| 24 | bool npc_can_be_damaged(int idx, const char *model); | ||
| 25 | int npc_damage_class(int idx, const char *model); | ||
| 26 | QAngle angle_to(const Vector &from, const Vector &to); | ||
| 27 | bool punch_angles(float &px, float &py); | ||
| 28 | int entptr_lookup(void *ent); | ||
| 29 | void entptr_store(void *ent, int idx); | ||
| 30 | void weapon_short_name(int idx, char *out, size_t outn); | ||
| 31 | void short_name(const char *model, char *out, size_t outn); | ||
| 32 | |||
| 33 | // Listen-server sanity latch, shared with esp_collect(). | ||
| 34 | extern bool g_srv_checked; | ||
| 35 | extern bool g_srv_trusted; | ||
| 36 | |||
| 14 | double esp_now(); | 37 | double esp_now(); |
| 15 | bool esp_update_screen(); | 38 | bool esp_update_screen(); |
| 16 | 39 | ||
