From 094ce7621e920276dc0e658cd43ca73db848f2f3 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 3 Nov 2026 22:53:05 +0100 Subject: 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. --- src/hl2h.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/hl2h.h') 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(); int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); bool server_set_velocity_z(int idx, float vz); int server_active_weapon(int idx); +int server_npc_relation(int idx, int local_idx); +bool server_npc_has_follow_target(int idx); int server_model_index(void *base); void find_modules(); void init_conmsg(); -- cgit v1.2.3