From 7101b7955071485a9bff33d55fc9f83f117b8f58 Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 26 Oct 2026 16:04:18 +0100 Subject: Bones: client-side SetupBones/studiohdr groundwork - bones.cpp: resolve IClientRenderable via IClientUnknown slot 6, validate it against IVModelInfo GetModel, call SetupBones (slot 16) with engine Time() (slot 14), and parse the studio header (GetStudiomodel, slot 29) for bones/bone names/parents and hitboxes - cache up to 64 entity bone snapshots, refreshed at ~30 Hz - helpers: bone_find/parent/pos, hitbox_center (e.g. "head") - debug probe: HL2H_BONE_DEBUG=1 draws a white marker at each NPC's head hitbox center and logs bone count/head position once --- src/hl2h.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/hl2h.h') diff --git a/src/hl2h.h b/src/hl2h.h index 0986017..d57105d 100644 --- a/src/hl2h.h +++ b/src/hl2h.h @@ -168,6 +168,14 @@ void draw_text_col(int x, int y, const char *s, int r, int g, int b); void esp_draw(); bool world_to_screen(const Vector &w, float &sx, float &sy); +// bones.cpp — client-side animated skeleton / hitbox access (see there) +bool bones_update(int idx, void *ent); +int bones_count(int idx); +int bone_find(int idx, const char *name); +int bone_parent(int idx, int bone); +bool bone_pos(int idx, int bone, Vector &out); +bool hitbox_center(int idx, const char *hitbox_name, Vector &out); + void outer_draw(); // raw ISurface slot calls used by the PaintTraverseEx hook (hl2h.cpp) using SurfFn = void (*)(void *, ...); -- cgit v1.2.3