summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-26 16:13:39 +0100
committersalmonik <salmonik@tuta.io>2026-10-26 16:13:39 +0100
commit23580674f50937933b317cef24f1ffebe8c2a9f9 (patch)
tree38a6a817a69c3c99740e1a6920ea49cfa335bc8a
parentBones: robust head lookup (hitbox name -> head bone) + hitbox dump (diff)
downloadhl2h-23580674f50937933b317cef24f1ffebe8c2a9f9.tar.gz
hl2h-23580674f50937933b317cef24f1ffebe8c2a9f9.zip
Bones: refresh snapshots every frame (head marker no longer lags)
-rw-r--r--src/bones.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bones.cpp b/src/bones.cpp
index bba61b9..88aa429 100644
--- a/src/bones.cpp
+++ b/src/bones.cpp
@@ -214,7 +214,9 @@ bool bones_update(int idx, void *ent) {
214 214
215 BoneEntry *e = find_entry(idx); 215 BoneEntry *e = find_entry(idx);
216 double now = bone_now(); 216 double now = bone_now();
217 if (e && e->ent == ent && e->valid && now - e->stamp < 0.03) 217 // Refresh every frame; the renderer's bone cache makes this a cheap memcpy
218 // for visible entities. A 30 Hz cache made the head marker visibly lag.
219 if (e && e->ent == ent && e->valid && now - e->stamp < 0.001)
218 return true; 220 return true;
219 if (!e) 221 if (!e)
220 e = alloc_entry(idx, ent); 222 e = alloc_entry(idx, ent);