From 12fde50efc7e1f1d123f9fc34ffef53d4387de2d Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 13:53:45 +0100 Subject: Add ESP, aim, view and movement batch - ESP: alert state (IDLE/ALERT/COMBAT/SCRIPT), enemy weapon labels, hostile/ neutral/friendly colour pickers, off-screen direction arrows, and trigger_changelevel volumes with next/previous map labels. - Aim: silent aim reuses the Aimbot FOV, vischeck and bone settings; add optional aim-punch compensation for aimbot, silent aim, triggerbot and melee (server bullets add m_vecPunchAngle to the usercmd angles). - View: always-on Camera / display card with camera FOV (writes the client m_iDefaultFOV netvar), viewmodel FOV and monitor gamma (client cvars). - Movement: Jump assist card with auto crouch-jump and edge jump (point ground probe 0.12 s ahead). - Spread: Engine spread override toggle gates the direct RandomFloat zeroing; off leaves only the seed search. - Server: entity count/base/classname helpers, trigger_changelevel map name and world bounds via IServerUnknown/ICollideable. - Netvars: m_vecPunchAngle and m_iDefaultFOV. --- src/menu.cpp | 147 ++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 121 insertions(+), 26 deletions(-) (limited to 'src/menu.cpp') diff --git a/src/menu.cpp b/src/menu.cpp index 00aa189..4e521f7 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -75,11 +75,20 @@ int g_aim_smooth = 5; // degrees per tick bool g_aim_vischeck = true; int g_aim_fov = 60; // angular distance from the crosshair bool g_aim_fov_circle = true; -int g_silent_fov = 60; +bool g_aim_punch = true; // compensate server aim punch +bool g_spread_engine = true; // zero the pellet random draws, not just the seed +bool g_auto_crouchjump = false; +bool g_edge_jump = false; +int g_fov_camera = 0; // 0 = game default +int g_fov_viewmodel = 0; // 0 = game default (54) +int g_gamma = 22; // mat_monitorgamma x10, stock 2.2 +int g_esp_col_hostile[3] = {255, 60, 60}; +int g_esp_col_neutral[3] = {220, 220, 220}; +int g_esp_col_friendly[3] = {60, 255, 60}; // ESP sub-options. Defaults match the pre-option behaviour: everything on. -bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true, true, - true}; +bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true, + true, true, true, true, true}; // --------------------------------------------------------------------------- // config persistence (INI format) @@ -185,21 +194,23 @@ void config_save() { fprintf(f, "[jumpbug]\nactive=%d\nbind=%d\nassist=%d\n", g_jumpbug.active, g_jumpbug.bind, (int)g_jumpbug_assist); fprintf(f, "[melee]\nactive=%d\nbind=%d\n", g_melee.active, g_melee.bind); - fprintf(f, "[spread]\nactive=%d\nbind=%d\nno_spread=%d\n", - g_spread.active, g_spread.bind, (int)g_spread_no_spread); + fprintf(f, "[spread]\nactive=%d\nbind=%d\nno_spread=%d\nengine=%d\n", + g_spread.active, g_spread.bind, (int)g_spread_no_spread, + (int)g_spread_engine); fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\nvischeck=%d\n" - "fov=%d\nfov_circle=%d\n" + "fov=%d\nfov_circle=%d\npunch=%d\n" "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" "bone_lleg=%d\nbone_rleg=%d\n", g_aimbot.active, g_aimbot.bind, g_aim_smooth, (int)g_aim_vischeck, g_aim_fov, (int)g_aim_fov_circle, - g_aim_bones[AIM_BONE_HEAD], g_aim_bones[AIM_BONE_TORSO], - g_aim_bones[AIM_BONE_LARM], g_aim_bones[AIM_BONE_RARM], - g_aim_bones[AIM_BONE_LLEG], g_aim_bones[AIM_BONE_RLEG]); + (int)g_aim_punch, g_aim_bones[AIM_BONE_HEAD], + g_aim_bones[AIM_BONE_TORSO], g_aim_bones[AIM_BONE_LARM], + g_aim_bones[AIM_BONE_RARM], g_aim_bones[AIM_BONE_LLEG], + g_aim_bones[AIM_BONE_RLEG]); fprintf(f, "[triggerbot]\nactive=%d\nbind=%d\n", g_triggerbot.active, g_triggerbot.bind); - fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active, - g_silentaim.bind, g_silent_fov); + fprintf(f, "[silentaim]\nactive=%d\nbind=%d\n", g_silentaim.active, + g_silentaim.bind); fprintf(f, "[fullbright]\nactive=%d\nbind=%d\n", g_fullbright.active, g_fullbright.bind); fprintf(f, "[worldtint]\nactive=%d\nbind=%d\nworld=%d\nsky=%d\n" @@ -223,13 +234,24 @@ void config_save() { (int)g_item_crates, (int)g_item_distance, g_item_max_dist); fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\nspeedgraph=%d\n" - "dmg=%d\n", + "dmg=%d\nalert=%d\nweapon=%d\narrows=%d\n" + "hr=%d\nhg=%d\nhb=%d\nnr=%d\nng=%d\nnb=%d\n" + "fr=%d\nfg=%d\nfb=%d\n", g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX], g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH], - g_esp_opt[ESP_OPT_DAMAGE_TAGS]); + g_esp_opt[ESP_OPT_DAMAGE_TAGS], g_esp_opt[ESP_OPT_ALERT], + g_esp_opt[ESP_OPT_WEAPON], g_esp_opt[ESP_OPT_ARROWS], + g_esp_col_hostile[0], g_esp_col_hostile[1], g_esp_col_hostile[2], + g_esp_col_neutral[0], g_esp_col_neutral[1], g_esp_col_neutral[2], + g_esp_col_friendly[0], g_esp_col_friendly[1], + g_esp_col_friendly[2]); + fprintf(f, "[view]\nfov=%d\nvmfov=%d\ngamma=%d\n", g_fov_camera, + g_fov_viewmodel, g_gamma); + fprintf(f, "[movement]\ncrouchjump=%d\nedgejump=%d\n", + (int)g_auto_crouchjump, (int)g_edge_jump); gui_config_write(f); bool ok = ferror(f) == 0; if (fflush(f) != 0) @@ -250,9 +272,9 @@ static bool config_load() { return false; char line[256]; FeatureState *cur = nullptr; - bool in_esp = false, in_bhop = false, in_aim = false, in_silent = false, + bool in_esp = false, in_bhop = false, in_aim = false, in_jumpbug = false, in_spread = false, in_items = false, - in_tint = false, in_fog = false; + in_tint = false, in_fog = false, in_view = false, in_movement = false; while (fgets(line, sizeof(line), f)) { line[strcspn(line, "\r\n")] = 0; if (line[0] == '[') { @@ -284,18 +306,23 @@ static bool config_load() { cur = &g_triggerbot; else if (strstr(line, "[silentaim]")) cur = &g_silentaim; + else if (strstr(line, "[view]")) + cur = nullptr; + else if (strstr(line, "[movement]")) + cur = nullptr; else cur = nullptr; in_esp = (cur == &g_esp); in_bhop = (cur == &g_bhop); in_aim = (cur == &g_aimbot); - in_silent = (cur == &g_silentaim); in_jumpbug = (cur == &g_jumpbug); in_spread = (cur == &g_spread); in_items = (cur == &g_item_esp); in_tint = (cur == &g_world_tint); in_fog = (cur == &g_fog); - } else if (cur) { + in_view = strstr(line, "[view]") != nullptr; + in_movement = strstr(line, "[movement]") != nullptr; + } else if (cur || in_view || in_movement) { char *eq = strchr(line, '='); if (!eq) continue; @@ -307,8 +334,11 @@ static bool config_load() { if (in_jumpbug && strcmp(key, "assist") == 0) { g_jumpbug_assist = atoi(val) != 0; } - if (in_spread && strcmp(key, "no_spread") == 0) { - g_spread_no_spread = atoi(val) != 0; + if (in_spread) { + if (strcmp(key, "no_spread") == 0) + g_spread_no_spread = atoi(val) != 0; + else if (strcmp(key, "engine") == 0) + g_spread_engine = atoi(val) != 0; } if (in_items) { if (strcmp(key, "health") == 0) @@ -357,13 +387,36 @@ static bool config_load() { g_aim_fov = v; } else if (strcmp(key, "fov_circle") == 0) { g_aim_fov_circle = atoi(val) != 0; + } else if (strcmp(key, "punch") == 0) { + g_aim_punch = atoi(val) != 0; } } - if (in_silent && strcmp(key, "fov") == 0) { - int v = atoi(val); - if (v < 1) v = 1; - if (v > 180) v = 180; - g_silent_fov = v; + if (in_view) { + int *dst = nullptr; + int lo = 0, hi = 0; + if (strcmp(key, "fov") == 0) { + dst = &g_fov_camera; + hi = 140; + } else if (strcmp(key, "vmfov") == 0) { + dst = &g_fov_viewmodel; + hi = 120; + } else if (strcmp(key, "gamma") == 0) { + dst = &g_gamma; + lo = 16; + hi = 30; + } + if (dst) { + int v = atoi(val); + if (v < lo) v = lo; + if (v > hi) v = hi; + *dst = v; + } + } + if (in_movement) { + if (strcmp(key, "crouchjump") == 0) + g_auto_crouchjump = atoi(val) != 0; + else if (strcmp(key, "edgejump") == 0) + g_edge_jump = atoi(val) != 0; } if (in_tint) { if (strcmp(key, "world") == 0) @@ -432,6 +485,31 @@ static bool config_load() { g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH] = atoi(val) != 0; else if (strcmp(key, "dmg") == 0) g_esp_opt[ESP_OPT_DAMAGE_TAGS] = atoi(val) != 0; + else if (strcmp(key, "alert") == 0) + g_esp_opt[ESP_OPT_ALERT] = atoi(val) != 0; + else if (strcmp(key, "weapon") == 0) + g_esp_opt[ESP_OPT_WEAPON] = atoi(val) != 0; + else if (strcmp(key, "arrows") == 0) + g_esp_opt[ESP_OPT_ARROWS] = atoi(val) != 0; + else if (strcmp(key, "hr") == 0 || strcmp(key, "hg") == 0 || + strcmp(key, "hb") == 0) { + int v = atoi(val); + if (v < 0) v = 0; + if (v > 255) v = 255; + g_esp_col_hostile[key[1] == 'r' ? 0 : key[1] == 'g' ? 1 : 2] = v; + } else if (strcmp(key, "nr") == 0 || strcmp(key, "ng") == 0 || + strcmp(key, "nb") == 0) { + int v = atoi(val); + if (v < 0) v = 0; + if (v > 255) v = 255; + g_esp_col_neutral[key[1] == 'r' ? 0 : key[1] == 'g' ? 1 : 2] = v; + } else if (strcmp(key, "fr") == 0 || strcmp(key, "fg") == 0 || + strcmp(key, "fb") == 0) { + int v = atoi(val); + if (v < 0) v = 0; + if (v > 255) v = 255; + g_esp_col_friendly[key[1] == 'r' ? 0 : key[1] == 'g' ? 1 : 2] = v; + } } if (strcmp(key, "active") == 0) cur->active = atoi(val) != 0; @@ -513,7 +591,22 @@ void config_reset_defaults() { g_aim_vischeck = true; g_aim_fov = 60; g_aim_fov_circle = true; - g_silent_fov = 60; + g_aim_punch = true; + g_spread_engine = true; + g_auto_crouchjump = false; + g_edge_jump = false; + g_fov_camera = 0; + g_fov_viewmodel = 0; + g_gamma = 22; + g_esp_col_hostile[0] = 255; + g_esp_col_hostile[1] = 60; + g_esp_col_hostile[2] = 60; + g_esp_col_neutral[0] = 220; + g_esp_col_neutral[1] = 220; + g_esp_col_neutral[2] = 220; + g_esp_col_friendly[0] = 60; + g_esp_col_friendly[1] = 255; + g_esp_col_friendly[2] = 60; config_save(); } @@ -669,7 +762,9 @@ bool aimbot_vischeck_enabled() { return g_aim_vischeck; } int aimbot_fov() { return g_aim_fov; } -int silentaim_fov() { return g_silent_fov; } +bool aim_punch_enabled() { return g_aim_punch; } + +bool spread_engine_enabled() { return g_spread_engine; } bool aimbot_fov_circle() { return g_aim_fov_circle; } -- cgit v1.2.3