From a161f01105edef7f7723116a424777a3c42fb6b8 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 12:54:29 +0100 Subject: ESP: HUD speed graph (last 10 s) - 0.1 s sampling, 100-sample ring; horizontal speed of the local player - small (240x64) panel centered in the lower half of the screen - min 0, max auto-scales to the maximum in the 10 s window; shows max value - ESP -> Show speed graph toggle, persisted as speedgraph=1 --- src/menu.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/menu.cpp') diff --git a/src/menu.cpp b/src/menu.cpp index 49dd886..3e20cb3 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -87,7 +87,7 @@ static int g_silent_fov = 60; // ESP sub-options (menu "ESP" children). Defaults match the pre-option // behaviour: everything on. -static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true}; +static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true, true}; // tree static MenuNode g_root{NODE_ROOT, "HL2hake", false, 0, {}, nullptr, nullptr, nullptr}; @@ -105,6 +105,7 @@ static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { {NODE_TOGGLE, "Show name", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_NAME], nullptr, nullptr}, {NODE_TOGGLE, "Show skeleton", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SKELETON], nullptr, nullptr}, {NODE_TOGGLE, "Show box", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_BOX], nullptr, nullptr}, + {NODE_TOGGLE, "Show speed graph", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH], nullptr, nullptr}, }; static MenuNode g_aimbot_feat{NODE_FEATURE, "Aimbot", false, 1, {}, nullptr, nullptr, nullptr}; static MenuNode g_aimbot_active{NODE_TOGGLE, "Active", false, 0, {}, &g_aimbot.active, nullptr, nullptr}; @@ -308,11 +309,12 @@ static void config_save() { fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active, g_silentaim.bind, g_silent_fov); fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" - "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\n", + "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\nspeedgraph=%d\n", g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], - g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX]); + g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX], + g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH]); fclose(f); } @@ -401,6 +403,8 @@ static void config_load() { g_esp_opt[ESP_OPT_SHOW_SKELETON] = atoi(val) != 0; else if (strcmp(key, "box") == 0) g_esp_opt[ESP_OPT_SHOW_BOX] = atoi(val) != 0; + else if (strcmp(key, "speedgraph") == 0) + g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH] = atoi(val) != 0; } if (strcmp(key, "active") == 0) cur->active = atoi(val) != 0; -- cgit v1.2.3