summaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
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 /CONTEXT.md
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 'CONTEXT.md')
-rw-r--r--CONTEXT.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/CONTEXT.md b/CONTEXT.md
index 283784f..c6b9c2c 100644
--- a/CONTEXT.md
+++ b/CONTEXT.md
@@ -148,6 +148,19 @@ vocabulary / decisions.
148 `rename()`d over the real file. A failed write raises an error toast. 148 `rename()`d over the real file. A failed write raises an error toast.
149 149
150 150
151## NPC friendliness
152
153- ESP colours, aimbot/silent-aim/melee target filtering use the server AI
154 relationship (`m_Relationship` CUtlVector) against the local player:
155 entity-specific rows first, then the CLASS_PLAYER class row. D_LI is
156 friendly, D_NU neutral, D_HT/D_FR hostile.
157- This makes map-scripted friendly turrets and other relationship overrides
158 dynamic instead of model-name guesses. When no row exists, the old model
159 heuristic is used.
160- Bugbait-controlled antlions are also treated as friendly when their server
161 `m_hFollowTarget` is set, covering antlions that spawned before the global
162 `antlion_allied` state changed.
163
151## Bones / ESP 164## Bones / ESP
152 165
153- `SetupBones(BONE_USED_BY_ANYTHING)` with engine `Time()`; studio header via 166- `SetupBones(BONE_USED_BY_ANYTHING)` with engine `Time()`; studio header via