summaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-28 13:02:26 +0100
committersalmonik <salmonik@tuta.io>2026-10-28 13:02:26 +0100
commitb212e8e13835cfdc4849a61c1b57146bd0312a29 (patch)
tree128a64c8c20411749ee8ea4a78ef4a51a9604515 /CONTEXT.md
parentCombat: fix silent-aim spread seed and lead projectiles (diff)
downloadhl2h-b212e8e13835cfdc4849a61c1b57146bd0312a29.tar.gz
hl2h-b212e8e13835cfdc4849a61c1b57146bd0312a29.zip
Melee: surface weapon state across maps; reset stale caches
- Map transitions often leave a non-crowbar weapon active, so the killbot silently does nothing. Log every active-weapon change as a normal `melee: active ... crowbar=0/1` line and toast once suggesting the crowbar. - Recover the crowbar model from the server entity when the client weapon model index is missing/0 after a map change. - Clear the bone cache and aim/silent locks when the local player entity changes (map load/respawn) so stale entity/model data cannot poison melee target selection.
Diffstat (limited to 'CONTEXT.md')
-rw-r--r--CONTEXT.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/CONTEXT.md b/CONTEXT.md
index a9e34d8..a9b85b9 100644
--- a/CONTEXT.md
+++ b/CONTEXT.md
@@ -190,6 +190,12 @@ vocabulary / decisions.
190 client `m_hActiveWeapon` handle is used first; if it is missing, the 190 client `m_hActiveWeapon` handle is used first; if it is missing, the
191 authoritative server `m_hActiveWeapon` handle (0x824) is used to get the 191 authoritative server `m_hActiveWeapon` handle (0x824) is used to get the
192 weapon entity index. 192 weapon entity index.
193- Map transitions often switch the active weapon away from the crowbar. The
194 state change is logged as `melee: active ... crowbar=0/1` (normal log), and
195 a one-time toast says to equip the crowbar. If the client weapon model is
196 missing/0, the server model index is used to recognize it.
197- Bone caches and aim locks are cleared when the local player entity changes
198 (map load/respawn).
193- Crowbar range is `CROWBAR_RANGE` 75 units from `Weapon_ShootPosition`. The 199- Crowbar range is `CROWBAR_RANGE` 75 units from `Weapon_ShootPosition`. The
194 selector computes the closest point on each hostile NPC's AABB to the eye, 200 selector computes the closest point on each hostile NPC's AABB to the eye,
195 rejects anything farther than 75, sorts by that distance, and picks the 201 rejects anything farther than 75, sorts by that distance, and picks the