diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-26 16:04:18 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-26 16:04:18 +0100 |
| commit | 7101b7955071485a9bff33d55fc9f83f117b8f58 (patch) | |
| tree | 3351eca32146d6f88f740ff73da7c84045942a55 /src/hl2h.h | |
| parent | Menu: start fully collapsed on first open (diff) | |
| download | hl2h-7101b7955071485a9bff33d55fc9f83f117b8f58.tar.gz hl2h-7101b7955071485a9bff33d55fc9f83f117b8f58.zip | |
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
Diffstat (limited to '')
| -rw-r--r-- | src/hl2h.h | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -168,6 +168,14 @@ void draw_text_col(int x, int y, const char *s, int r, int g, int b); | |||
| 168 | void esp_draw(); | 168 | void esp_draw(); |
| 169 | bool world_to_screen(const Vector &w, float &sx, float &sy); | 169 | bool world_to_screen(const Vector &w, float &sx, float &sy); |
| 170 | 170 | ||
| 171 | // bones.cpp — client-side animated skeleton / hitbox access (see there) | ||
| 172 | bool bones_update(int idx, void *ent); | ||
| 173 | int bones_count(int idx); | ||
| 174 | int bone_find(int idx, const char *name); | ||
| 175 | int bone_parent(int idx, int bone); | ||
| 176 | bool bone_pos(int idx, int bone, Vector &out); | ||
| 177 | bool hitbox_center(int idx, const char *hitbox_name, Vector &out); | ||
| 178 | |||
| 171 | void outer_draw(); | 179 | void outer_draw(); |
| 172 | // raw ISurface slot calls used by the PaintTraverseEx hook (hl2h.cpp) | 180 | // raw ISurface slot calls used by the PaintTraverseEx hook (hl2h.cpp) |
| 173 | using SurfFn = void (*)(void *, ...); | 181 | using SurfFn = void (*)(void *, ...); |
