From f93a21ce167169fc70ec0b3e913aca815aad8b5e Mon Sep 17 00:00:00 2001 From: Wizzard <25581244+Wizzard@users.noreply.toomuchslop.com> Date: Wed, 20 Sep 2023 23:19:16 -0400 Subject: [PATCH] Stop anti-aim on attack and use --- src/features/anti_aim.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/features/anti_aim.c b/src/features/anti_aim.c index ed5ebf4..90c84f6 100644 --- a/src/features/anti_aim.c +++ b/src/features/anti_aim.c @@ -12,6 +12,15 @@ float random_float(float min, float max) { } void anti_aim(usercmd_t* cmd) { + if (cmd->buttons & IN_ATTACK || cmd->buttons & IN_USE) { + if (cmd->buttons & IN_ATTACK) { + i_engine->pfnClientCmd("echo \"Attack detected. Spinbot stopped.\""); + } else if (cmd->buttons & IN_USE) { + i_engine->pfnClientCmd("echo \"Use key detected. Spinbot stopped.\""); + } + return; + } + if (!CVAR_ON(movement_antiaim)) { return; } @@ -45,3 +54,4 @@ void anti_aim(usercmd_t* cmd) { } } +