summaryrefslogtreecommitdiffstats
path: root/src/esp.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 13:03:12 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 13:03:12 +0100
commitccd94d28c00b4e0cd76db0a75b87006af597d7c6 (patch)
treeab7d6519ce50f9a31fb26ac743433a3400133fe1 /src/esp.cpp
parentSpeed graph: only sample while in-game and unpaused (diff)
downloadhl2h-ccd94d28c00b4e0cd76db0a75b87006af597d7c6.tar.gz
hl2h-ccd94d28c00b4e0cd76db0a75b87006af597d7c6.zip
Speed graph: show current speed at the top-right
Diffstat (limited to 'src/esp.cpp')
-rw-r--r--src/esp.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/esp.cpp b/src/esp.cpp
index e1e8fac..1e00a92 100644
--- a/src/esp.cpp
+++ b/src/esp.cpp
@@ -406,6 +406,12 @@ static void draw_speed_graph() {
406 char label[32]; 406 char label[32];
407 snprintf(label, sizeof(label), "max %d", (int)maxv); 407 snprintf(label, sizeof(label), "max %d", (int)maxv);
408 draw_text_col(x + 3, y + 2, label, 200, 200, 200); 408 draw_text_col(x + 3, y + 2, label, 200, 200, 200);
409
410 int cur_idx = (g_speed_head + SPEED_SAMPLES - 1) % SPEED_SAMPLES;
411 char cur[16];
412 snprintf(cur, sizeof(cur), "%d", (int)g_speed_samples[cur_idx]);
413 int cur_w = (int)strlen(cur) * 8;
414 draw_text_col(x + w - 4 - cur_w, y + 2, cur, 255, 255, 255);
409} 415}
410 416
411// Draw the parent->child bone links. Bone snapshots are world-space matrices 417// Draw the parent->child bone links. Bone snapshots are world-space matrices