diff options
Diffstat (limited to 'src/menu.cpp')
| -rw-r--r-- | src/menu.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/menu.cpp b/src/menu.cpp index 0ed89d4..4f76529 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -63,6 +63,7 @@ static bool g_bhop_autostrafe = true; | |||
| 63 | 63 | ||
| 64 | static FeatureState g_abh{true, 0}; | 64 | static FeatureState g_abh{true, 0}; |
| 65 | static FeatureState g_jumpbug{true, 0}; | 65 | static FeatureState g_jumpbug{true, 0}; |
| 66 | static bool g_jumpbug_assist = false; | ||
| 66 | static FeatureState g_esp{true, 0}; | 67 | static FeatureState g_esp{true, 0}; |
| 67 | static FeatureState g_aimbot{true, 604}; // default Mouse5, rebindable in menu | 68 | static FeatureState g_aimbot{true, 604}; // default Mouse5, rebindable in menu |
| 68 | static FeatureState g_triggerbot{true, 603}; // default Mouse4 | 69 | static FeatureState g_triggerbot{true, 603}; // default Mouse4 |
| @@ -99,6 +100,7 @@ static MenuNode g_abh_feat{NODE_FEATURE, "ABH", false, 1, {}, nullptr, nullptr, | |||
| 99 | static MenuNode g_abh_active{NODE_TOGGLE, "Active", false, 0, {}, &g_abh.active, nullptr, nullptr}; | 100 | static MenuNode g_abh_active{NODE_TOGGLE, "Active", false, 0, {}, &g_abh.active, nullptr, nullptr}; |
| 100 | static MenuNode g_jumpbug_feat{NODE_FEATURE, "Jumpbug", false, 1, {}, nullptr, nullptr, nullptr}; | 101 | static MenuNode g_jumpbug_feat{NODE_FEATURE, "Jumpbug", false, 1, {}, nullptr, nullptr, nullptr}; |
| 101 | static MenuNode g_jumpbug_active{NODE_TOGGLE, "Active", false, 0, {}, &g_jumpbug.active, nullptr, nullptr}; | 102 | static MenuNode g_jumpbug_active{NODE_TOGGLE, "Active", false, 0, {}, &g_jumpbug.active, nullptr, nullptr}; |
| 103 | static MenuNode g_jumpbug_assist_node{NODE_TOGGLE, "Assist timing", false, 0, {}, &g_jumpbug_assist, nullptr, nullptr}; | ||
| 102 | static MenuNode g_esp_feat{NODE_FEATURE, "ESP", false, 1, {}, nullptr, nullptr, nullptr}; | 104 | static MenuNode g_esp_feat{NODE_FEATURE, "ESP", false, 1, {}, nullptr, nullptr, nullptr}; |
| 103 | static MenuNode g_esp_active{NODE_TOGGLE, "Active", false, 0, {}, &g_esp.active, nullptr, nullptr}; | 105 | static MenuNode g_esp_active{NODE_TOGGLE, "Active", false, 0, {}, &g_esp.active, nullptr, nullptr}; |
| 104 | static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { | 106 | static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { |
| @@ -150,7 +152,8 @@ static void build_tree() { | |||
| 150 | g_abh_feat.children[0] = &g_abh_active; | 152 | g_abh_feat.children[0] = &g_abh_active; |
| 151 | g_abh_feat.child_count = 1; | 153 | g_abh_feat.child_count = 1; |
| 152 | g_jumpbug_feat.children[0] = &g_jumpbug_active; | 154 | g_jumpbug_feat.children[0] = &g_jumpbug_active; |
| 153 | g_jumpbug_feat.child_count = 1; | 155 | g_jumpbug_feat.children[1] = &g_jumpbug_assist_node; |
| 156 | g_jumpbug_feat.child_count = 2; | ||
| 154 | g_esp_feat.children[0] = &g_esp_active; | 157 | g_esp_feat.children[0] = &g_esp_active; |
| 155 | g_aimbot_feat.children[0] = &g_aimbot_active; | 158 | g_aimbot_feat.children[0] = &g_aimbot_active; |
| 156 | g_aimbot_feat.children[1] = &g_aimbot_bind; | 159 | g_aimbot_feat.children[1] = &g_aimbot_bind; |
| @@ -302,7 +305,8 @@ static void config_save() { | |||
| 302 | fprintf(f, "[bhop]\nactive=%d\nbind=%d\nautostrafe=%d\n", g_bhop.active, | 305 | fprintf(f, "[bhop]\nactive=%d\nbind=%d\nautostrafe=%d\n", g_bhop.active, |
| 303 | g_bhop.bind, g_bhop_autostrafe); | 306 | g_bhop.bind, g_bhop_autostrafe); |
| 304 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); | 307 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); |
| 305 | fprintf(f, "[jumpbug]\nactive=%d\n", g_jumpbug.active); | 308 | fprintf(f, "[jumpbug]\nactive=%d\nassist=%d\n", g_jumpbug.active, |
| 309 | (int)g_jumpbug_assist); | ||
| 306 | fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\nvischeck=%d\n" | 310 | fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\nvischeck=%d\n" |
| 307 | "fov=%d\nfov_circle=%d\n" | 311 | "fov=%d\nfov_circle=%d\n" |
| 308 | "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" | 312 | "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" |
| @@ -332,7 +336,8 @@ static void config_load() { | |||
| 332 | return; | 336 | return; |
| 333 | char line[256]; | 337 | char line[256]; |
| 334 | FeatureState *cur = nullptr; | 338 | FeatureState *cur = nullptr; |
| 335 | bool in_esp = false, in_bhop = false, in_aim = false, in_silent = false; | 339 | bool in_esp = false, in_bhop = false, in_aim = false, in_silent = false, |
| 340 | in_jumpbug = false; | ||
| 336 | while (fgets(line, sizeof(line), f)) { | 341 | while (fgets(line, sizeof(line), f)) { |
| 337 | line[strcspn(line, "\r\n")] = 0; | 342 | line[strcspn(line, "\r\n")] = 0; |
| 338 | if (line[0] == '[') { | 343 | if (line[0] == '[') { |
| @@ -356,6 +361,7 @@ static void config_load() { | |||
| 356 | in_bhop = (cur == &g_bhop); | 361 | in_bhop = (cur == &g_bhop); |
| 357 | in_aim = (cur == &g_aimbot); | 362 | in_aim = (cur == &g_aimbot); |
| 358 | in_silent = (cur == &g_silentaim); | 363 | in_silent = (cur == &g_silentaim); |
| 364 | in_jumpbug = (cur == &g_jumpbug); | ||
| 359 | } else if (cur) { | 365 | } else if (cur) { |
| 360 | char *eq = strchr(line, '='); | 366 | char *eq = strchr(line, '='); |
| 361 | if (!eq) | 367 | if (!eq) |
| @@ -365,6 +371,9 @@ static void config_load() { | |||
| 365 | if (in_bhop && strcmp(key, "autostrafe") == 0) { | 371 | if (in_bhop && strcmp(key, "autostrafe") == 0) { |
| 366 | g_bhop_autostrafe = atoi(val) != 0; | 372 | g_bhop_autostrafe = atoi(val) != 0; |
| 367 | } | 373 | } |
| 374 | if (in_jumpbug && strcmp(key, "assist") == 0) { | ||
| 375 | g_jumpbug_assist = atoi(val) != 0; | ||
| 376 | } | ||
| 368 | if (in_aim) { | 377 | if (in_aim) { |
| 369 | if (strcmp(key, "smooth") == 0) { | 378 | if (strcmp(key, "smooth") == 0) { |
| 370 | int v = atoi(val); | 379 | int v = atoi(val); |
| @@ -557,6 +566,8 @@ bool esp_option(int opt) { | |||
| 557 | 566 | ||
| 558 | bool bhop_autostrafe_enabled() { return g_bhop_autostrafe; } | 567 | bool bhop_autostrafe_enabled() { return g_bhop_autostrafe; } |
| 559 | 568 | ||
| 569 | bool jumpbug_assist_enabled() { return g_jumpbug_assist; } | ||
| 570 | |||
| 560 | unsigned aimbot_bone_mask() { | 571 | unsigned aimbot_bone_mask() { |
| 561 | unsigned m = 0; | 572 | unsigned m = 0; |
| 562 | if (g_aim_bones[AIM_BONE_HEAD]) | 573 | if (g_aim_bones[AIM_BONE_HEAD]) |
