diff options
Diffstat (limited to '')
| -rw-r--r-- | src/menu.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/menu.cpp b/src/menu.cpp index 8df67fe..f590d69 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -64,6 +64,7 @@ static bool g_bhop_autostrafe = true; | |||
| 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 bool g_jumpbug_assist = false; |
| 67 | static FeatureState g_melee{true, 0}; | ||
| 67 | static FeatureState g_esp{true, 0}; | 68 | static FeatureState g_esp{true, 0}; |
| 68 | static FeatureState g_aimbot{true, 604}; // default Mouse5, rebindable in menu | 69 | static FeatureState g_aimbot{true, 604}; // default Mouse5, rebindable in menu |
| 69 | static FeatureState g_triggerbot{true, 603}; // default Mouse4 | 70 | static FeatureState g_triggerbot{true, 603}; // default Mouse4 |
| @@ -101,6 +102,8 @@ static MenuNode g_abh_active{NODE_TOGGLE, "Active", false, 0, {}, &g_abh.active, | |||
| 101 | static MenuNode g_jumpbug_feat{NODE_FEATURE, "Jumpbug", false, 1, {}, nullptr, nullptr, nullptr}; | 102 | static MenuNode g_jumpbug_feat{NODE_FEATURE, "Jumpbug", false, 1, {}, nullptr, nullptr, nullptr}; |
| 102 | static MenuNode g_jumpbug_active{NODE_TOGGLE, "Active", false, 0, {}, &g_jumpbug.active, nullptr, nullptr}; | 103 | 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}; | 104 | static MenuNode g_jumpbug_assist_node{NODE_TOGGLE, "Assist timing", false, 0, {}, &g_jumpbug_assist, nullptr, nullptr}; |
| 105 | static MenuNode g_melee_feat{NODE_FEATURE, "Melee killbot", false, 1, {}, nullptr, nullptr, nullptr}; | ||
| 106 | static MenuNode g_melee_active{NODE_TOGGLE, "Active", false, 0, {}, &g_melee.active, nullptr, nullptr}; | ||
| 104 | static MenuNode g_esp_feat{NODE_FEATURE, "ESP", false, 1, {}, nullptr, nullptr, nullptr}; | 107 | static MenuNode g_esp_feat{NODE_FEATURE, "ESP", false, 1, {}, nullptr, nullptr, nullptr}; |
| 105 | static MenuNode g_esp_active{NODE_TOGGLE, "Active", false, 0, {}, &g_esp.active, nullptr, nullptr}; | 108 | static MenuNode g_esp_active{NODE_TOGGLE, "Active", false, 0, {}, &g_esp.active, nullptr, nullptr}; |
| 106 | static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { | 109 | static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { |
| @@ -156,6 +159,8 @@ static void build_tree() { | |||
| 156 | g_jumpbug_feat.children[0] = &g_jumpbug_active; | 159 | g_jumpbug_feat.children[0] = &g_jumpbug_active; |
| 157 | g_jumpbug_feat.children[1] = &g_jumpbug_assist_node; | 160 | g_jumpbug_feat.children[1] = &g_jumpbug_assist_node; |
| 158 | g_jumpbug_feat.child_count = 2; | 161 | g_jumpbug_feat.child_count = 2; |
| 162 | g_melee_feat.children[0] = &g_melee_active; | ||
| 163 | g_melee_feat.child_count = 1; | ||
| 159 | g_esp_feat.children[0] = &g_esp_active; | 164 | g_esp_feat.children[0] = &g_esp_active; |
| 160 | g_aimbot_feat.children[0] = &g_aimbot_active; | 165 | g_aimbot_feat.children[0] = &g_aimbot_active; |
| 161 | g_aimbot_feat.children[1] = &g_aimbot_bind; | 166 | g_aimbot_feat.children[1] = &g_aimbot_bind; |
| @@ -181,11 +186,12 @@ static void build_tree() { | |||
| 181 | g_root.children[0] = &g_bhop_feat; | 186 | g_root.children[0] = &g_bhop_feat; |
| 182 | g_root.children[1] = &g_abh_feat; | 187 | g_root.children[1] = &g_abh_feat; |
| 183 | g_root.children[2] = &g_jumpbug_feat; | 188 | g_root.children[2] = &g_jumpbug_feat; |
| 184 | g_root.children[3] = &g_esp_feat; | 189 | g_root.children[3] = &g_melee_feat; |
| 185 | g_root.children[4] = &g_aimbot_feat; | 190 | g_root.children[4] = &g_esp_feat; |
| 186 | g_root.children[5] = &g_triggerbot_feat; | 191 | g_root.children[5] = &g_aimbot_feat; |
| 187 | g_root.children[6] = &g_silentaim_feat; | 192 | g_root.children[6] = &g_triggerbot_feat; |
| 188 | g_root.child_count = 7; | 193 | g_root.children[7] = &g_silentaim_feat; |
| 194 | g_root.child_count = 8; | ||
| 189 | } | 195 | } |
| 190 | 196 | ||
| 191 | static int g_depth[48]; // depth of each visible row (for indentation) | 197 | static int g_depth[48]; // depth of each visible row (for indentation) |
| @@ -309,6 +315,7 @@ static void config_save() { | |||
| 309 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); | 315 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); |
| 310 | fprintf(f, "[jumpbug]\nactive=%d\nassist=%d\n", g_jumpbug.active, | 316 | fprintf(f, "[jumpbug]\nactive=%d\nassist=%d\n", g_jumpbug.active, |
| 311 | (int)g_jumpbug_assist); | 317 | (int)g_jumpbug_assist); |
| 318 | fprintf(f, "[melee]\nactive=%d\n", g_melee.active); | ||
| 312 | fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\nvischeck=%d\n" | 319 | fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\nvischeck=%d\n" |
| 313 | "fov=%d\nfov_circle=%d\n" | 320 | "fov=%d\nfov_circle=%d\n" |
| 314 | "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" | 321 | "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" |
| @@ -349,6 +356,8 @@ static void config_load() { | |||
| 349 | cur = &g_abh; | 356 | cur = &g_abh; |
| 350 | else if (strstr(line, "[jumpbug]")) | 357 | else if (strstr(line, "[jumpbug]")) |
| 351 | cur = &g_jumpbug; | 358 | cur = &g_jumpbug; |
| 359 | else if (strstr(line, "[melee]")) | ||
| 360 | cur = &g_melee; | ||
| 352 | else if (strstr(line, "[esp]")) | 361 | else if (strstr(line, "[esp]")) |
| 353 | cur = &g_esp; | 362 | cur = &g_esp; |
| 354 | else if (strstr(line, "[aimbot]")) | 363 | else if (strstr(line, "[aimbot]")) |
| @@ -537,10 +546,10 @@ static bool key_pressed(int sc) { | |||
| 537 | // feature gate queried from hl2h.cpp do_move(): feature must be Active AND | 546 | // feature gate queried from hl2h.cpp do_move(): feature must be Active AND |
| 538 | // its bind key held (always-on when unbound). | 547 | // its bind key held (always-on when unbound). |
| 539 | static FeatureState *feature_state(int feature) { | 548 | static FeatureState *feature_state(int feature) { |
| 540 | static FeatureState *feats[7] = {&g_bhop, &g_abh, &g_esp, | 549 | static FeatureState *feats[8] = {&g_bhop, &g_abh, &g_esp, |
| 541 | &g_aimbot, &g_triggerbot, &g_silentaim, | 550 | &g_aimbot, &g_triggerbot, &g_silentaim, |
| 542 | &g_jumpbug}; | 551 | &g_jumpbug, &g_melee}; |
| 543 | if (feature < 0 || feature > 6) | 552 | if (feature < 0 || feature > 7) |
| 544 | return nullptr; | 553 | return nullptr; |
| 545 | return feats[feature]; | 554 | return feats[feature]; |
| 546 | } | 555 | } |
