diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 12:54:29 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 12:54:40 +0100 |
| commit | a161f01105edef7f7723116a424777a3c42fb6b8 (patch) | |
| tree | d05b52e1f3a29e8c20976edb6b2c5dd6148a56a0 /src/menu.cpp | |
| parent | Docs: add roadmap including distance weapon spread thesis (diff) | |
| download | hl2h-a161f01105edef7f7723116a424777a3c42fb6b8.tar.gz hl2h-a161f01105edef7f7723116a424777a3c42fb6b8.zip | |
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
Diffstat (limited to 'src/menu.cpp')
| -rw-r--r-- | src/menu.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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; | |||
| 87 | 87 | ||
| 88 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option | 88 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option |
| 89 | // behaviour: everything on. | 89 | // behaviour: everything on. |
| 90 | static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true}; | 90 | static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true, true}; |
| 91 | 91 | ||
| 92 | // tree | 92 | // tree |
| 93 | static MenuNode g_root{NODE_ROOT, "HL2hake", false, 0, {}, nullptr, nullptr, nullptr}; | 93 | 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] = { | |||
| 105 | {NODE_TOGGLE, "Show name", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_NAME], nullptr, nullptr}, | 105 | {NODE_TOGGLE, "Show name", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_NAME], nullptr, nullptr}, |
| 106 | {NODE_TOGGLE, "Show skeleton", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SKELETON], nullptr, nullptr}, | 106 | {NODE_TOGGLE, "Show skeleton", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SKELETON], nullptr, nullptr}, |
| 107 | {NODE_TOGGLE, "Show box", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_BOX], nullptr, nullptr}, | 107 | {NODE_TOGGLE, "Show box", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_BOX], nullptr, nullptr}, |
| 108 | {NODE_TOGGLE, "Show speed graph", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH], nullptr, nullptr}, | ||
| 108 | }; | 109 | }; |
| 109 | static MenuNode g_aimbot_feat{NODE_FEATURE, "Aimbot", false, 1, {}, nullptr, nullptr, nullptr}; | 110 | static MenuNode g_aimbot_feat{NODE_FEATURE, "Aimbot", false, 1, {}, nullptr, nullptr, nullptr}; |
| 110 | static MenuNode g_aimbot_active{NODE_TOGGLE, "Active", false, 0, {}, &g_aimbot.active, nullptr, nullptr}; | 111 | static MenuNode g_aimbot_active{NODE_TOGGLE, "Active", false, 0, {}, &g_aimbot.active, nullptr, nullptr}; |
| @@ -308,11 +309,12 @@ static void config_save() { | |||
| 308 | fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active, | 309 | fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active, |
| 309 | g_silentaim.bind, g_silent_fov); | 310 | g_silentaim.bind, g_silent_fov); |
| 310 | fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" | 311 | fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" |
| 311 | "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\n", | 312 | "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\nspeedgraph=%d\n", |
| 312 | g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], | 313 | g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], |
| 313 | g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], | 314 | g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], |
| 314 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], | 315 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], |
| 315 | g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX]); | 316 | g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX], |
| 317 | g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH]); | ||
| 316 | fclose(f); | 318 | fclose(f); |
| 317 | } | 319 | } |
| 318 | 320 | ||
| @@ -401,6 +403,8 @@ static void config_load() { | |||
| 401 | g_esp_opt[ESP_OPT_SHOW_SKELETON] = atoi(val) != 0; | 403 | g_esp_opt[ESP_OPT_SHOW_SKELETON] = atoi(val) != 0; |
| 402 | else if (strcmp(key, "box") == 0) | 404 | else if (strcmp(key, "box") == 0) |
| 403 | g_esp_opt[ESP_OPT_SHOW_BOX] = atoi(val) != 0; | 405 | g_esp_opt[ESP_OPT_SHOW_BOX] = atoi(val) != 0; |
| 406 | else if (strcmp(key, "speedgraph") == 0) | ||
| 407 | g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH] = atoi(val) != 0; | ||
| 404 | } | 408 | } |
| 405 | if (strcmp(key, "active") == 0) | 409 | if (strcmp(key, "active") == 0) |
| 406 | cur->active = atoi(val) != 0; | 410 | cur->active = atoi(val) != 0; |
