diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-26 16:15:22 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-26 16:15:22 +0100 |
| commit | ea163c157bd30e4c54fa917ffe0465f5a6d1c663 (patch) | |
| tree | b7466203f533dadb04532df4ff2fade4cd90590b /src/menu.cpp | |
| parent | Bones: refresh snapshots every frame (head marker no longer lags) (diff) | |
| download | hl2h-ea163c157bd30e4c54fa917ffe0465f5a6d1c663.tar.gz hl2h-ea163c157bd30e4c54fa917ffe0465f5a6d1c663.zip | |
ESP: skeleton ESP
- render parent->child bone links from the SetupBones world matrices
(ISurface DrawLine, projected once per bone)
- menu option "Show skeleton" under ESP, persisted as skeleton=1
- skeletons use the same hostile/friendly/neutral colours as the boxes
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 6244002..6474d69 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -59,7 +59,7 @@ static FeatureState g_esp{true, 0}; | |||
| 59 | 59 | ||
| 60 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option | 60 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option |
| 61 | // behaviour: everything on. | 61 | // behaviour: everything on. |
| 62 | static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true}; | 62 | static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true}; |
| 63 | 63 | ||
| 64 | // tree | 64 | // tree |
| 65 | static MenuNode g_root{NODE_ROOT, "HL2hake", false, 0, {}, nullptr, nullptr, nullptr}; | 65 | static MenuNode g_root{NODE_ROOT, "HL2hake", false, 0, {}, nullptr, nullptr, nullptr}; |
| @@ -75,6 +75,7 @@ static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { | |||
| 75 | {NODE_TOGGLE, "Show healthbar", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], nullptr, nullptr}, | 75 | {NODE_TOGGLE, "Show healthbar", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], nullptr, nullptr}, |
| 76 | {NODE_TOGGLE, "Show healthnum", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], nullptr, nullptr}, | 76 | {NODE_TOGGLE, "Show healthnum", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], nullptr, nullptr}, |
| 77 | {NODE_TOGGLE, "Show name", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_NAME], nullptr, nullptr}, | 77 | {NODE_TOGGLE, "Show name", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_NAME], nullptr, nullptr}, |
| 78 | {NODE_TOGGLE, "Show skeleton", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SKELETON], nullptr, nullptr}, | ||
| 78 | }; | 79 | }; |
| 79 | 80 | ||
| 80 | static MenuNode *g_visible[32]; // flattened visible nodes for arrow navigation | 81 | static MenuNode *g_visible[32]; // flattened visible nodes for arrow navigation |
| @@ -159,10 +160,11 @@ static void config_save() { | |||
| 159 | g_bhop.bind, g_bhop_autostrafe); | 160 | g_bhop.bind, g_bhop_autostrafe); |
| 160 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); | 161 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); |
| 161 | fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" | 162 | fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" |
| 162 | "healthnum=%d\nname=%d\n", | 163 | "healthnum=%d\nname=%d\nskeleton=%d\n", |
| 163 | g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], | 164 | g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], |
| 164 | g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], | 165 | g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], |
| 165 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME]); | 166 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], |
| 167 | g_esp_opt[ESP_OPT_SHOW_SKELETON]); | ||
| 166 | fclose(f); | 168 | fclose(f); |
| 167 | } | 169 | } |
| 168 | 170 | ||
| @@ -204,6 +206,8 @@ static void config_load() { | |||
| 204 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM] = atoi(val) != 0; | 206 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM] = atoi(val) != 0; |
| 205 | else if (strcmp(key, "name") == 0) | 207 | else if (strcmp(key, "name") == 0) |
| 206 | g_esp_opt[ESP_OPT_SHOW_NAME] = atoi(val) != 0; | 208 | g_esp_opt[ESP_OPT_SHOW_NAME] = atoi(val) != 0; |
| 209 | else if (strcmp(key, "skeleton") == 0) | ||
| 210 | g_esp_opt[ESP_OPT_SHOW_SKELETON] = atoi(val) != 0; | ||
| 207 | } | 211 | } |
| 208 | if (strcmp(key, "active") == 0) | 212 | if (strcmp(key, "active") == 0) |
| 209 | cur->active = atoi(val) != 0; | 213 | cur->active = atoi(val) != 0; |
