diff options
Diffstat (limited to 'src/menu.cpp')
| -rw-r--r-- | src/menu.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/menu.cpp b/src/menu.cpp index db52fd2..d26b62e 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -75,6 +75,7 @@ enum { | |||
| 75 | static bool g_aim_bones[AIM_BONE_COUNT] = {true, false, false, | 75 | static bool g_aim_bones[AIM_BONE_COUNT] = {true, false, false, |
| 76 | false, false, false}; | 76 | false, false, false}; |
| 77 | static int g_aim_smooth = 5; // degrees per tick | 77 | static int g_aim_smooth = 5; // degrees per tick |
| 78 | static bool g_aim_vischeck = true; | ||
| 78 | 79 | ||
| 79 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option | 80 | // ESP sub-options (menu "ESP" children). Defaults match the pre-option |
| 80 | // behaviour: everything on. | 81 | // behaviour: everything on. |
| @@ -101,6 +102,7 @@ static MenuNode g_aimbot_feat{NODE_FEATURE, "Aimbot", false, 1, {}, nullptr, nul | |||
| 101 | static MenuNode g_aimbot_active{NODE_TOGGLE, "Active", false, 0, {}, &g_aimbot.active, nullptr, nullptr}; | 102 | static MenuNode g_aimbot_active{NODE_TOGGLE, "Active", false, 0, {}, &g_aimbot.active, nullptr, nullptr}; |
| 102 | static MenuNode g_aimbot_bind{NODE_BIND, "Bind", false, 0, {}, nullptr, &g_aimbot.bind, nullptr}; | 103 | static MenuNode g_aimbot_bind{NODE_BIND, "Bind", false, 0, {}, nullptr, &g_aimbot.bind, nullptr}; |
| 103 | static MenuNode g_aimbot_bones_feat{NODE_FEATURE, "Bones", false, 0, {}, nullptr, nullptr, nullptr}; | 104 | static MenuNode g_aimbot_bones_feat{NODE_FEATURE, "Bones", false, 0, {}, nullptr, nullptr, nullptr}; |
| 105 | static MenuNode g_aimbot_vischeck_node{NODE_TOGGLE, "Vischeck", false, 0, {}, &g_aim_vischeck, nullptr, nullptr}; | ||
| 104 | static MenuNode g_aimbot_bone_nodes[AIM_BONE_COUNT] = { | 106 | static MenuNode g_aimbot_bone_nodes[AIM_BONE_COUNT] = { |
| 105 | {NODE_TOGGLE, "Head", false, 0, {}, &g_aim_bones[AIM_BONE_HEAD], nullptr, nullptr}, | 107 | {NODE_TOGGLE, "Head", false, 0, {}, &g_aim_bones[AIM_BONE_HEAD], nullptr, nullptr}, |
| 106 | {NODE_TOGGLE, "Torso", false, 0, {}, &g_aim_bones[AIM_BONE_TORSO], nullptr, nullptr}, | 108 | {NODE_TOGGLE, "Torso", false, 0, {}, &g_aim_bones[AIM_BONE_TORSO], nullptr, nullptr}, |
| @@ -126,9 +128,10 @@ static void build_tree() { | |||
| 126 | g_esp_feat.children[0] = &g_esp_active; | 128 | g_esp_feat.children[0] = &g_esp_active; |
| 127 | g_aimbot_feat.children[0] = &g_aimbot_active; | 129 | g_aimbot_feat.children[0] = &g_aimbot_active; |
| 128 | g_aimbot_feat.children[1] = &g_aimbot_bind; | 130 | g_aimbot_feat.children[1] = &g_aimbot_bind; |
| 129 | g_aimbot_feat.children[2] = &g_aimbot_bones_feat; | 131 | g_aimbot_feat.children[2] = &g_aimbot_vischeck_node; |
| 130 | g_aimbot_feat.children[3] = &g_aimbot_smooth_node; | 132 | g_aimbot_feat.children[3] = &g_aimbot_bones_feat; |
| 131 | g_aimbot_feat.child_count = 4; | 133 | g_aimbot_feat.children[4] = &g_aimbot_smooth_node; |
| 134 | g_aimbot_feat.child_count = 5; | ||
| 132 | for (int i = 0; i < AIM_BONE_COUNT; i++) | 135 | for (int i = 0; i < AIM_BONE_COUNT; i++) |
| 133 | g_aimbot_bones_feat.children[i] = &g_aimbot_bone_nodes[i]; | 136 | g_aimbot_bones_feat.children[i] = &g_aimbot_bone_nodes[i]; |
| 134 | g_aimbot_bones_feat.child_count = AIM_BONE_COUNT; | 137 | g_aimbot_bones_feat.child_count = AIM_BONE_COUNT; |
| @@ -203,10 +206,11 @@ static void config_save() { | |||
| 203 | fprintf(f, "[bhop]\nactive=%d\nbind=%d\nautostrafe=%d\n", g_bhop.active, | 206 | fprintf(f, "[bhop]\nactive=%d\nbind=%d\nautostrafe=%d\n", g_bhop.active, |
| 204 | g_bhop.bind, g_bhop_autostrafe); | 207 | g_bhop.bind, g_bhop_autostrafe); |
| 205 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); | 208 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); |
| 206 | fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\n" | 209 | fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\nvischeck=%d\n" |
| 207 | "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" | 210 | "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" |
| 208 | "bone_lleg=%d\nbone_rleg=%d\n", | 211 | "bone_lleg=%d\nbone_rleg=%d\n", |
| 209 | g_aimbot.active, g_aimbot.bind, g_aim_smooth, | 212 | g_aimbot.active, g_aimbot.bind, g_aim_smooth, |
| 213 | (int)g_aim_vischeck, | ||
| 210 | g_aim_bones[AIM_BONE_HEAD], g_aim_bones[AIM_BONE_TORSO], | 214 | g_aim_bones[AIM_BONE_HEAD], g_aim_bones[AIM_BONE_TORSO], |
| 211 | g_aim_bones[AIM_BONE_LARM], g_aim_bones[AIM_BONE_RARM], | 215 | g_aim_bones[AIM_BONE_LARM], g_aim_bones[AIM_BONE_RARM], |
| 212 | g_aim_bones[AIM_BONE_LLEG], g_aim_bones[AIM_BONE_RLEG]); | 216 | g_aim_bones[AIM_BONE_LLEG], g_aim_bones[AIM_BONE_RLEG]); |
| @@ -269,6 +273,8 @@ static void config_load() { | |||
| 269 | g_aim_bones[AIM_BONE_LLEG] = atoi(val) != 0; | 273 | g_aim_bones[AIM_BONE_LLEG] = atoi(val) != 0; |
| 270 | } else if (strcmp(key, "bone_rleg") == 0) { | 274 | } else if (strcmp(key, "bone_rleg") == 0) { |
| 271 | g_aim_bones[AIM_BONE_RLEG] = atoi(val) != 0; | 275 | g_aim_bones[AIM_BONE_RLEG] = atoi(val) != 0; |
| 276 | } else if (strcmp(key, "vischeck") == 0) { | ||
| 277 | g_aim_vischeck = atoi(val) != 0; | ||
| 272 | } | 278 | } |
| 273 | } | 279 | } |
| 274 | if (in_esp) { | 280 | if (in_esp) { |
| @@ -429,6 +435,8 @@ unsigned aimbot_bone_mask() { | |||
| 429 | 435 | ||
| 430 | int aimbot_smooth_step() { return g_aim_smooth; } | 436 | int aimbot_smooth_step() { return g_aim_smooth; } |
| 431 | 437 | ||
| 438 | bool aimbot_vischeck_enabled() { return g_aim_vischeck; } | ||
| 439 | |||
| 432 | static void menu_handle_input() { | 440 | static void menu_handle_input() { |
| 433 | poll_keyboard(); | 441 | poll_keyboard(); |
| 434 | 442 | ||
