From b0696b2b5dae15c7a503aaabae27e915aff4673b Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 13:00:14 +0100 Subject: Speed graph: only sample while in-game and unpaused --- src/esp.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/esp.cpp') diff --git a/src/esp.cpp b/src/esp.cpp index 78a357c..e1e8fac 100644 --- a/src/esp.cpp +++ b/src/esp.cpp @@ -341,6 +341,15 @@ static void draw_fov_circle() { // Speed graph: 100 samples at 0.1 s = the last 10 seconds; min is 0, max is // the window maximum. Small and centered in the lower half of the screen. static void speed_graph_sample() { + // Only while actually playing: IVEngineClient013 slot 26 IsInGame, + // slot 84 IsPaused. + if (g_iface.engine) { + using BoolFn = bool (*)(void *); + if (!vfunc(g_iface.engine, 26)(g_iface.engine)) + return; + if (vfunc(g_iface.engine, 84)(g_iface.engine)) + return; + } double now = esp_now(); if (now - g_speed_last_sample < 0.1) return; -- cgit v1.2.3