From b212e8e13835cfdc4849a61c1b57146bd0312a29 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 13:02:26 +0100 Subject: 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. --- CONTEXT.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index a9e34d8..a9b85b9 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -190,6 +190,12 @@ vocabulary / decisions. client `m_hActiveWeapon` handle is used first; if it is missing, the authoritative server `m_hActiveWeapon` handle (0x824) is used to get the weapon entity index. +- Map transitions often switch the active weapon away from the crowbar. The + state change is logged as `melee: active ... crowbar=0/1` (normal log), and + a one-time toast says to equip the crowbar. If the client weapon model is + missing/0, the server model index is used to recognize it. +- Bone caches and aim locks are cleared when the local player entity changes + (map load/respawn). - Crowbar range is `CROWBAR_RANGE` 75 units from `Weapon_ShootPosition`. The selector computes the closest point on each hostile NPC's AABB to the eye, rejects anything farther than 75, sorts by that distance, and picks the -- cgit v1.2.3