diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 20:17:07 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 20:17:07 +0100 |
| commit | 59432708a4ae926e4be2959dfbb2b4eb80be3fd6 (patch) | |
| tree | 3233f49d2c9b3affbb97d832b4afdccbfb5f43b6 /src/menu.cpp | |
| parent | Fix tooltip truncation; add Stucklaunch assist (diff) | |
| download | hl2h-59432708a4ae926e4be2959dfbb2b4eb80be3fd6.tar.gz hl2h-59432708a4ae926e4be2959dfbb2b4eb80be3fd6.zip | |
Stucklaunch: alternate attack/use and expose spam rate
- Gravity-gun spam now alternates +attack (grab) and +use (drop) instead of
pressing both together, which would punt the prop.
- Add a Spam rate slider (1..16 ticks, default 2) so the pickup/drop cycle can
be tuned; it persists as spam_ticks in [stucklaunch].
- Log the prop index the first few times a stucklaunch engages to aid testing.
Diffstat (limited to 'src/menu.cpp')
| -rw-r--r-- | src/menu.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/menu.cpp b/src/menu.cpp index 00ba9be..0b8e20b 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -48,6 +48,7 @@ FeatureState g_stucklaunch{false, 0}; // opt-in movement assist | |||
| 48 | bool g_stucklaunch_use_spam = true; | 48 | bool g_stucklaunch_use_spam = true; |
| 49 | bool g_stucklaunch_gravspam = false; | 49 | bool g_stucklaunch_gravspam = false; |
| 50 | bool g_stucklaunch_autostrafe = true; | 50 | bool g_stucklaunch_autostrafe = true; |
| 51 | int g_stucklaunch_spam_ticks = 2; | ||
| 51 | 52 | ||
| 52 | // Aimbot bone checklist. Head defaults on (v1 behaviour). | 53 | // Aimbot bone checklist. Head defaults on (v1 behaviour). |
| 53 | bool g_aim_bones[AIM_BONE_COUNT] = {true, false, false, | 54 | bool g_aim_bones[AIM_BONE_COUNT] = {true, false, false, |
| @@ -163,10 +164,10 @@ void config_save() { | |||
| 163 | g_bhop.bind, g_bhop_autostrafe); | 164 | g_bhop.bind, g_bhop_autostrafe); |
| 164 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); | 165 | fprintf(f, "[abh]\nactive=%d\nbind=%d\n", g_abh.active, g_abh.bind); |
| 165 | fprintf(f, "[stucklaunch]\nactive=%d\nbind=%d\nuse_spam=%d\n" | 166 | fprintf(f, "[stucklaunch]\nactive=%d\nbind=%d\nuse_spam=%d\n" |
| 166 | "gravspam=%d\nautostrafe=%d\n", | 167 | "gravspam=%d\nautostrafe=%d\nspam_ticks=%d\n", |
| 167 | g_stucklaunch.active, g_stucklaunch.bind, | 168 | g_stucklaunch.active, g_stucklaunch.bind, |
| 168 | (int)g_stucklaunch_use_spam, (int)g_stucklaunch_gravspam, | 169 | (int)g_stucklaunch_use_spam, (int)g_stucklaunch_gravspam, |
| 169 | (int)g_stucklaunch_autostrafe); | 170 | (int)g_stucklaunch_autostrafe, g_stucklaunch_spam_ticks); |
| 170 | fprintf(f, "[jumpbug]\nactive=%d\nbind=%d\nassist=%d\n", | 171 | fprintf(f, "[jumpbug]\nactive=%d\nbind=%d\nassist=%d\n", |
| 171 | g_jumpbug.active, g_jumpbug.bind, (int)g_jumpbug_assist); | 172 | g_jumpbug.active, g_jumpbug.bind, (int)g_jumpbug_assist); |
| 172 | fprintf(f, "[melee]\nactive=%d\nbind=%d\n", g_melee.active, g_melee.bind); | 173 | fprintf(f, "[melee]\nactive=%d\nbind=%d\n", g_melee.active, g_melee.bind); |
| @@ -268,6 +269,12 @@ static bool config_load() { | |||
| 268 | g_stucklaunch_gravspam = atoi(val) != 0; | 269 | g_stucklaunch_gravspam = atoi(val) != 0; |
| 269 | else if (strcmp(key, "autostrafe") == 0) | 270 | else if (strcmp(key, "autostrafe") == 0) |
| 270 | g_stucklaunch_autostrafe = atoi(val) != 0; | 271 | g_stucklaunch_autostrafe = atoi(val) != 0; |
| 272 | else if (strcmp(key, "spam_ticks") == 0) { | ||
| 273 | int v = atoi(val); | ||
| 274 | if (v < 1) v = 1; | ||
| 275 | if (v > 16) v = 16; | ||
| 276 | g_stucklaunch_spam_ticks = v; | ||
| 277 | } | ||
| 271 | } | 278 | } |
| 272 | if (in_aim) { | 279 | if (in_aim) { |
| 273 | if (strcmp(key, "smooth") == 0) { | 280 | if (strcmp(key, "smooth") == 0) { |
| @@ -351,6 +358,7 @@ void config_reset_defaults() { | |||
| 351 | g_stucklaunch_use_spam = true; | 358 | g_stucklaunch_use_spam = true; |
| 352 | g_stucklaunch_gravspam = false; | 359 | g_stucklaunch_gravspam = false; |
| 353 | g_stucklaunch_autostrafe = true; | 360 | g_stucklaunch_autostrafe = true; |
| 361 | g_stucklaunch_spam_ticks = 2; | ||
| 354 | g_jumpbug = {true, 0}; | 362 | g_jumpbug = {true, 0}; |
| 355 | g_jumpbug_assist = false; | 363 | g_jumpbug_assist = false; |
| 356 | g_melee = {true, 0}; | 364 | g_melee = {true, 0}; |
| @@ -497,6 +505,8 @@ bool stucklaunch_gravspam_enabled() { return g_stucklaunch_gravspam; } | |||
| 497 | 505 | ||
| 498 | bool stucklaunch_autostrafe_enabled() { return g_stucklaunch_autostrafe; } | 506 | bool stucklaunch_autostrafe_enabled() { return g_stucklaunch_autostrafe; } |
| 499 | 507 | ||
| 508 | int stucklaunch_spam_ticks() { return g_stucklaunch_spam_ticks; } | ||
| 509 | |||
| 500 | unsigned aimbot_bone_mask() { | 510 | unsigned aimbot_bone_mask() { |
| 501 | unsigned m = 0; | 511 | unsigned m = 0; |
| 502 | if (g_aim_bones[AIM_BONE_HEAD]) | 512 | if (g_aim_bones[AIM_BONE_HEAD]) |
