summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-03 22:53:05 +0100
committersalmonik <salmonik@tuta.io>2026-11-03 22:53:05 +0100
commit094ce7621e920276dc0e658cd43ca73db848f2f3 (patch)
tree5c191fe2aa69fb7d59229c19091f12dfe208ce56 /src/hl2h.h
parentFix undefined fullbright symbols; link with --no-undefined (diff)
downloadhl2h-094ce7621e920276dc0e658cd43ca73db848f2f3.tar.gz
hl2h-094ce7621e920276dc0e658cd43ca73db848f2f3.zip
AI: use server relationships to classify NPC friendliness
- Read the server NPC's m_Relationship CUtlVector (entity row for the local player first, then the CLASS_PLAYER row): D_LI friendly, D_NU neutral, D_HT/D_FR hostile. - Use it for ESP colours and aimbot/silent-aim/melee target filtering, with the existing model heuristic as a fallback. - Treat bugbait-controlled antlions as friendly when their server m_hFollowTarget is set. - Resolve m_Relationship/m_hFollowTarget datamap offsets and log them.
Diffstat (limited to '')
-rw-r--r--src/hl2h.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hl2h.h b/src/hl2h.h
index e441167..414e061 100644
--- a/src/hl2h.h
+++ b/src/hl2h.h
@@ -252,6 +252,8 @@ bool resolve_server_netvars();
252int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); 252int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out);
253bool server_set_velocity_z(int idx, float vz); 253bool server_set_velocity_z(int idx, float vz);
254int server_active_weapon(int idx); 254int server_active_weapon(int idx);
255int server_npc_relation(int idx, int local_idx);
256bool server_npc_has_follow_target(int idx);
255int server_model_index(void *base); 257int server_model_index(void *base);
256void find_modules(); 258void find_modules();
257void init_conmsg(); 259void init_conmsg();