diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-26 17:07:32 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-26 17:07:32 +0100 |
| commit | 057c10951cb279d9809a579659a6d86448f9114d (patch) | |
| tree | c075ef4cd41e6d31fcb224968c93cb2fd02abac9 /src | |
| parent | Aimbot v2: bone checklist and numeric smoothness (diff) | |
| download | hl2h-057c10951cb279d9809a579659a6d86448f9114d.tar.gz hl2h-057c10951cb279d9809a579659a6d86448f9114d.zip | |
ESP: add Show box toggle
Diffstat (limited to '')
| -rw-r--r-- | src/esp.cpp | 3 | ||||
| -rw-r--r-- | src/hl2h.h | 3 | ||||
| -rw-r--r-- | src/menu.cpp | 9 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/esp.cpp b/src/esp.cpp index fbeb234..57f67ae 100644 --- a/src/esp.cpp +++ b/src/esp.cpp | |||
| @@ -516,7 +516,8 @@ void esp_draw() { | |||
| 516 | int right = (int)(t.sx + w / 2); | 516 | int right = (int)(t.sx + w / 2); |
| 517 | int top = (int)(t.sy - t.h); | 517 | int top = (int)(t.sy - t.h); |
| 518 | int bot = (int)t.sy; | 518 | int bot = (int)t.sy; |
| 519 | surf_rect(0, left, top, right, bot); | 519 | if (esp_option(ESP_OPT_SHOW_BOX)) |
| 520 | surf_rect(0, left, top, right, bot); | ||
| 520 | bool draw_bar = t.show_health && esp_option(ESP_OPT_SHOW_HEALTHBAR); | 521 | bool draw_bar = t.show_health && esp_option(ESP_OPT_SHOW_HEALTHBAR); |
| 521 | bool draw_num = t.show_health && esp_option(ESP_OPT_SHOW_HEALTHNUM); | 522 | bool draw_num = t.show_health && esp_option(ESP_OPT_SHOW_HEALTHNUM); |
| 522 | int num_x = right + 3; | 523 | int num_x = right + 3; |
| @@ -144,7 +144,8 @@ enum EspOption { | |||
| 144 | ESP_OPT_SHOW_HEALTHNUM = 2, | 144 | ESP_OPT_SHOW_HEALTHNUM = 2, |
| 145 | ESP_OPT_SHOW_NAME = 3, | 145 | ESP_OPT_SHOW_NAME = 3, |
| 146 | ESP_OPT_SHOW_SKELETON = 4, | 146 | ESP_OPT_SHOW_SKELETON = 4, |
| 147 | ESP_OPT_COUNT = 5 | 147 | ESP_OPT_SHOW_BOX = 5, |
| 148 | ESP_OPT_COUNT = 6 | ||
| 148 | }; | 149 | }; |
| 149 | 150 | ||
| 150 | // --------------------------------------------------------------------------- | 151 | // --------------------------------------------------------------------------- |
diff --git a/src/menu.cpp b/src/menu.cpp index 56f8c95..db52fd2 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -78,7 +78,7 @@ static int g_aim_smooth = 5; // degrees per tick | |||
| 78 | 78 | ||
| 79 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option | 79 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option |
| 80 | // behaviour: everything on. | 80 | // behaviour: everything on. |
| 81 | static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true}; | 81 | static bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true}; |
| 82 | 82 | ||
| 83 | // tree | 83 | // tree |
| 84 | static MenuNode g_root{NODE_ROOT, "HL2hake", false, 0, {}, nullptr, nullptr, nullptr}; | 84 | static MenuNode g_root{NODE_ROOT, "HL2hake", false, 0, {}, nullptr, nullptr, nullptr}; |
| @@ -95,6 +95,7 @@ static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { | |||
| 95 | {NODE_TOGGLE, "Show healthnum", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], nullptr, nullptr}, | 95 | {NODE_TOGGLE, "Show healthnum", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], nullptr, nullptr}, |
| 96 | {NODE_TOGGLE, "Show name", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_NAME], nullptr, nullptr}, | 96 | {NODE_TOGGLE, "Show name", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_NAME], nullptr, nullptr}, |
| 97 | {NODE_TOGGLE, "Show skeleton", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SKELETON], nullptr, nullptr}, | 97 | {NODE_TOGGLE, "Show skeleton", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_SKELETON], nullptr, nullptr}, |
| 98 | {NODE_TOGGLE, "Show box", false, 0, {}, &g_esp_opt[ESP_OPT_SHOW_BOX], nullptr, nullptr}, | ||
| 98 | }; | 99 | }; |
| 99 | static MenuNode g_aimbot_feat{NODE_FEATURE, "Aimbot", false, 1, {}, nullptr, nullptr, nullptr}; | 100 | static MenuNode g_aimbot_feat{NODE_FEATURE, "Aimbot", false, 1, {}, nullptr, nullptr, nullptr}; |
| 100 | static MenuNode g_aimbot_active{NODE_TOGGLE, "Active", false, 0, {}, &g_aimbot.active, nullptr, nullptr}; | 101 | static MenuNode g_aimbot_active{NODE_TOGGLE, "Active", false, 0, {}, &g_aimbot.active, nullptr, nullptr}; |
| @@ -210,11 +211,11 @@ static void config_save() { | |||
| 210 | g_aim_bones[AIM_BONE_LARM], g_aim_bones[AIM_BONE_RARM], | 211 | g_aim_bones[AIM_BONE_LARM], g_aim_bones[AIM_BONE_RARM], |
| 211 | g_aim_bones[AIM_BONE_LLEG], g_aim_bones[AIM_BONE_RLEG]); | 212 | g_aim_bones[AIM_BONE_LLEG], g_aim_bones[AIM_BONE_RLEG]); |
| 212 | fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" | 213 | fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" |
| 213 | "healthnum=%d\nname=%d\nskeleton=%d\n", | 214 | "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\n", |
| 214 | g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], | 215 | g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], |
| 215 | g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], | 216 | g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], |
| 216 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], | 217 | g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], |
| 217 | g_esp_opt[ESP_OPT_SHOW_SKELETON]); | 218 | g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX]); |
| 218 | fclose(f); | 219 | fclose(f); |
| 219 | } | 220 | } |
| 220 | 221 | ||
| @@ -281,6 +282,8 @@ static void config_load() { | |||
| 281 | g_esp_opt[ESP_OPT_SHOW_NAME] = atoi(val) != 0; | 282 | g_esp_opt[ESP_OPT_SHOW_NAME] = atoi(val) != 0; |
| 282 | else if (strcmp(key, "skeleton") == 0) | 283 | else if (strcmp(key, "skeleton") == 0) |
| 283 | g_esp_opt[ESP_OPT_SHOW_SKELETON] = atoi(val) != 0; | 284 | g_esp_opt[ESP_OPT_SHOW_SKELETON] = atoi(val) != 0; |
| 285 | else if (strcmp(key, "box") == 0) | ||
| 286 | g_esp_opt[ESP_OPT_SHOW_BOX] = atoi(val) != 0; | ||
| 284 | } | 287 | } |
| 285 | if (strcmp(key, "active") == 0) | 288 | if (strcmp(key, "active") == 0) |
| 286 | cur->active = atoi(val) != 0; | 289 | cur->active = atoi(val) != 0; |
