diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-03 22:53:05 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-03 22:53:05 +0100 |
| commit | 094ce7621e920276dc0e658cd43ca73db848f2f3 (patch) | |
| tree | 5c191fe2aa69fb7d59229c19091f12dfe208ce56 /src/hl2h.h | |
| parent | Fix undefined fullbright symbols; link with --no-undefined (diff) | |
| download | hl2h-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -252,6 +252,8 @@ bool resolve_server_netvars(); | |||
| 252 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); | 252 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); |
| 253 | bool server_set_velocity_z(int idx, float vz); | 253 | bool server_set_velocity_z(int idx, float vz); |
| 254 | int server_active_weapon(int idx); | 254 | int server_active_weapon(int idx); |
| 255 | int server_npc_relation(int idx, int local_idx); | ||
| 256 | bool server_npc_has_follow_target(int idx); | ||
| 255 | int server_model_index(void *base); | 257 | int server_model_index(void *base); |
| 256 | void find_modules(); | 258 | void find_modules(); |
| 257 | void init_conmsg(); | 259 | void init_conmsg(); |
