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