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. --- src/hl2h.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/hl2h.h') diff --git a/src/hl2h.h b/src/hl2h.h index 9b4fa8a..9c0440f 100644 --- a/src/hl2h.h +++ b/src/hl2h.h @@ -286,6 +286,7 @@ bool bone_is_skeleton_core(int idx, int bone); int bone_nearest_core_parent(int idx, int bone); bool bones_is_humanoid(int idx); bool hitbox_center(int idx, const char *hitbox_name, Vector &out); +void bones_clear(); bool head_position(int idx, Vector &out); int aim_points(int idx, unsigned group_mask, Vector *out, int max); -- cgit v1.2.3