Stop anti-aim on attack and use

This commit is contained in:
Wizzard 2023-09-20 23:19:16 -04:00
parent 87208744e1
commit f93a21ce16
1 changed files with 10 additions and 0 deletions

View File

@ -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) {
}
}