diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-26 15:33:02 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-26 15:33:02 +0100 |
| commit | d7edcc9d9e3d90e1c53885870461e046389dee96 (patch) | |
| tree | d4e80c026f65cbff9804c80184293d0c1b63afa8 /src/cinput.cpp | |
| parent | Default map d1_town_01 (intro-less, enemies spawned) (diff) | |
| download | hl2h-d7edcc9d9e3d90e1c53885870461e046389dee96.tar.gz hl2h-d7edcc9d9e3d90e1c53885870461e046389dee96.zip | |
ESP working: NPC detection + authoritative server-side health
- entitylist slot 6 (GetHighestEntityIndex); class name via
GetClientNetworkable -> GetClientClass (replaces the unsafe slot-2 call)
- HL2 SP NPCs: class CAI_BaseNPC + m_lifeState, since NPC m_iHealth is not
networked; model names from VModelInfoClient006 for labels/friend-foe
- real HP/HP-max from the listen-server entity (IVEngineServer021 ->
PEntityOfEntIndex -> edict->m_pUnk -> GetBaseEntity) using offsets scanned
from server.so's datamap; validated against the client model index
- world_to_screen via IVDebugOverlay003::ScreenPosition (fixes box drift)
- maxs sanity clamp, NPC-only debug logging, neutral colour for wildlife
- build.sh: restore -o libhl2hake.so and add server.cpp
Diffstat (limited to 'src/cinput.cpp')
| -rw-r--r-- | src/cinput.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cinput.cpp b/src/cinput.cpp index 7c40b3b..f4ba322 100644 --- a/src/cinput.cpp +++ b/src/cinput.cpp | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | // cinput.cpp — CInput discovery, usercmd CRC, get/fix helpers | 1 | // cinput.cpp — CInput discovery, usercmd CRC, get/fix helpers |
| 2 | #include "hl2h.h" | 2 | #include "hl2h.h" |
| 3 | uintptr_t g_input = 0; | ||
| 3 | 4 | ||
| 4 | // --------------------------------------------------------------------------- | 5 | // --------------------------------------------------------------------------- |
| 5 | // CRC-32 (standard IEEE reflected, matches Valve's implementation) | 6 | // CRC-32 (standard IEEE reflected, matches Valve's implementation) |
