summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp14
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
48bool g_stucklaunch_use_spam = true; 48bool g_stucklaunch_use_spam = true;
49bool g_stucklaunch_gravspam = false; 49bool g_stucklaunch_gravspam = false;
50bool g_stucklaunch_autostrafe = true; 50bool g_stucklaunch_autostrafe = true;
51int 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).
53bool g_aim_bones[AIM_BONE_COUNT] = {true, false, false, 54bool 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
498bool stucklaunch_autostrafe_enabled() { return g_stucklaunch_autostrafe; } 506bool stucklaunch_autostrafe_enabled() { return g_stucklaunch_autostrafe; }
499 507
508int stucklaunch_spam_ticks() { return g_stucklaunch_spam_ticks; }
509
500unsigned aimbot_bone_mask() { 510unsigned 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])