summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-26 15:33:02 +0100
committersalmonik <salmonik@tuta.io>2026-10-26 15:33:02 +0100
commitd7edcc9d9e3d90e1c53885870461e046389dee96 (patch)
treed4e80c026f65cbff9804c80184293d0c1b63afa8 /build.sh
parentDefault map d1_town_01 (intro-less, enemies spawned) (diff)
downloadhl2h-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 '')
-rwxr-xr-xbuild.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 6e54ccf..d1538ad 100755
--- a/build.sh
+++ b/build.sh
@@ -2,6 +2,7 @@
2set -e 2set -e
3cd "$(dirname "$0")" 3cd "$(dirname "$0")"
4g++ -m32 -O2 -std=c++17 -Wall -Wextra -Werror -fPIC -shared -fvisibility=hidden \ 4g++ -m32 -O2 -std=c++17 -Wall -Wextra -Werror -fPIC -shared -fvisibility=hidden \
5 src/hl2h.cpp src/modules.cpp src/cinput.cpp src/netvars.cpp src/menu.cpp src/esp.cpp \ 5 -o libhl2hake.so \
6 src/hl2h.cpp src/modules.cpp src/cinput.cpp src/netvars.cpp src/menu.cpp src/esp.cpp src/server.cpp \
6 -ldl 7 -ldl
7file libhl2hake.so 8file libhl2hake.so