diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-03 23:36:58 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-03 23:36:58 +0100 |
| commit | 5ee8eb4a2b96b4a9916f85ddec5b43ae24ca93d1 (patch) | |
| tree | f618c930aa6bcd51f396598872194943c442b172 /CONTEXT.md | |
| parent | World: add prop tint and fog override (diff) | |
| download | hl2h-5ee8eb4a2b96b4a9916f85ddec5b43ae24ca93d1.tar.gz hl2h-5ee8eb4a2b96b4a9916f85ddec5b43ae24ca93d1.zip | |
AI: treat scripted NPCs as neutral; Lamarr neutral
Read the server m_NPCState and mark NPC_STATE_SCRIPT actors neutral so
cutscene NPCs and scripted pets are not aimbot targets and draw in the
neutral colour. Add Lamarr (Kleiner's pet headcrab) to the neutral model
list as requested.
Also log state changes in the NPC debug line and resolve/log m_NPCState in
the server datamap summary.
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 9 |
1 files changed, 9 insertions, 0 deletions
| @@ -174,6 +174,15 @@ vocabulary / decisions. | |||
| 174 | - Bugbait-controlled antlions are also treated as friendly when their server | 174 | - Bugbait-controlled antlions are also treated as friendly when their server |
| 175 | `m_hFollowTarget` is set, covering antlions that spawned before the global | 175 | `m_hFollowTarget` is set, covering antlions that spawned before the global |
| 176 | `antlion_allied` state changed. | 176 | `antlion_allied` state changed. |
| 177 | - Stock NPCs have no `m_Relationship` rows at all: their disposition comes from | ||
| 178 | the global `CHL2GameRules::InitDefaultRelationships()` table indexed by | ||
| 179 | `Classify()` (e.g. `CLASS_PLAYER_ALLY -> D_LI`, `CLASS_HEADCRAB -> D_HT`). | ||
| 180 | That table is not stored per entity, so `relation=-1` is normal and the | ||
| 181 | model heuristic is the fallback for those NPCs (Kleiner, Combine, ...). | ||
| 182 | - `m_NPCState` (`FIELD_INTEGER`, server datamap) is read as well: | ||
| 183 | `NPC_STATE_SCRIPT` (4) marks scripted/passive actors as neutral, so they are | ||
| 184 | not aimbot targets and draw with the neutral colour. Lamarr | ||
| 185 | (`models/Lamarr.mdl`) is additionally listed as neutral by model. | ||
| 177 | 186 | ||
| 178 | ## Bones / ESP | 187 | ## Bones / ESP |
| 179 | 188 | ||
