From bb99c978c5f982e80a3007101fd61fe23635e242 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 13:19:00 +0100 Subject: Jumpbug: automatic duck+jump on damaging falls - Predict the landing speed from the current vertical velocity and a swept standing-hull ground trace; engage only when it exceeds PLAYER_MAX_SAFE_FALL_SPEED. - Press duck one command before the unduck window so FinishDuck's 36-unit origin raise places the feet ~37 units above the floor. - On the next command release duck and press jump: PlayerMove runs Duck() before CheckJumpButton, so FinishUnDuck sets ground, the jump executes, and CheckFalling never sees ground for the fall-damage check. - Measure the per-command fall from consecutive airborne origins instead of a fixed tick interval; clear IN_JUMP while waiting so the pogo latch is clear. - New Movement -> Jumpbug -> Active toggle (default on), config [jumpbug]. --- src/menu.cpp | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'src/menu.cpp') diff --git a/src/menu.cpp b/src/menu.cpp index 3e20cb3..0ed89d4 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -62,6 +62,7 @@ static FeatureState g_bhop{true, 0}; static bool g_bhop_autostrafe = true; static FeatureState g_abh{true, 0}; +static FeatureState g_jumpbug{true, 0}; static FeatureState g_esp{true, 0}; static FeatureState g_aimbot{true, 604}; // default Mouse5, rebindable in menu static FeatureState g_triggerbot{true, 603}; // default Mouse4 @@ -96,6 +97,8 @@ static MenuNode g_bhop_active{NODE_TOGGLE, "Active", false, 0, {}, &g_bhop.activ static MenuNode g_bhop_autostrafe_node{NODE_TOGGLE, "Uni-directional auto-strafe", false, 0, {}, &g_bhop_autostrafe, nullptr, nullptr}; static MenuNode g_abh_feat{NODE_FEATURE, "ABH", false, 1, {}, nullptr, nullptr, nullptr}; static MenuNode g_abh_active{NODE_TOGGLE, "Active", false, 0, {}, &g_abh.active, nullptr, nullptr}; +static MenuNode g_jumpbug_feat{NODE_FEATURE, "Jumpbug", false, 1, {}, nullptr, nullptr, nullptr}; +static MenuNode g_jumpbug_active{NODE_TOGGLE, "Active", false, 0, {}, &g_jumpbug.active, nullptr, nullptr}; static MenuNode g_esp_feat{NODE_FEATURE, "ESP", false, 1, {}, nullptr, nullptr, nullptr}; static MenuNode g_esp_active{NODE_TOGGLE, "Active", false, 0, {}, &g_esp.active, nullptr, nullptr}; static MenuNode g_esp_opt_nodes[ESP_OPT_COUNT] = { @@ -145,6 +148,9 @@ static void build_tree() { g_bhop_feat.children[1] = &g_bhop_autostrafe_node; g_bhop_feat.child_count = 2; g_abh_feat.children[0] = &g_abh_active; + g_abh_feat.child_count = 1; + g_jumpbug_feat.children[0] = &g_jumpbug_active; + g_jumpbug_feat.child_count = 1; g_esp_feat.children[0] = &g_esp_active; g_aimbot_feat.children[0] = &g_aimbot_active; g_aimbot_feat.children[1] = &g_aimbot_bind; @@ -169,11 +175,12 @@ static void build_tree() { g_esp_feat.child_count = ESP_OPT_COUNT + 1; g_root.children[0] = &g_bhop_feat; g_root.children[1] = &g_abh_feat; - g_root.children[2] = &g_esp_feat; - g_root.children[3] = &g_aimbot_feat; - g_root.children[4] = &g_triggerbot_feat; - g_root.children[5] = &g_silentaim_feat; - g_root.child_count = 6; + g_root.children[2] = &g_jumpbug_feat; + g_root.children[3] = &g_esp_feat; + g_root.children[4] = &g_aimbot_feat; + g_root.children[5] = &g_triggerbot_feat; + g_root.children[6] = &g_silentaim_feat; + g_root.child_count = 7; } static int g_depth[48]; // depth of each visible row (for indentation) @@ -295,6 +302,7 @@ static void config_save() { fprintf(f, "[bhop]\nactive=%d\nbind=%d\nautostrafe=%d\n", g_bhop.active, g_bhop.bind, g_bhop_autostrafe); fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); + fprintf(f, "[jumpbug]\nactive=%d\n", g_jumpbug.active); fprintf(f, "[aimbot]\nactive=%d\nbind=%d\nsmooth=%d\nvischeck=%d\n" "fov=%d\nfov_circle=%d\n" "bone_head=%d\nbone_torso=%d\nbone_larm=%d\nbone_rarm=%d\n" @@ -332,6 +340,8 @@ static void config_load() { cur = &g_bhop; else if (strstr(line, "[abh]")) cur = &g_abh; + else if (strstr(line, "[jumpbug]")) + cur = &g_jumpbug; else if (strstr(line, "[esp]")) cur = &g_esp; else if (strstr(line, "[aimbot]")) @@ -516,10 +526,10 @@ static bool key_pressed(int sc) { // feature gate queried from hl2h.cpp do_move(): feature must be Active AND // its bind key held (always-on when unbound). static FeatureState *feature_state(int feature) { - static FeatureState *feats[6] = {&g_bhop, &g_abh, &g_esp, - &g_aimbot, &g_triggerbot, - &g_silentaim}; - if (feature < 0 || feature > 5) + static FeatureState *feats[7] = {&g_bhop, &g_abh, &g_esp, + &g_aimbot, &g_triggerbot, &g_silentaim, + &g_jumpbug}; + if (feature < 0 || feature > 6) return nullptr; return feats[feature]; } -- cgit v1.2.3