Compare commits

...

2 Commits

Author SHA1 Message Date
Wizzard 0b0664e4cf More advanced antiaim, also added fakeduck 2023-09-20 23:43:31 -04:00
Wizzard d3b6c64003 More advanced antiaim, also added fakeduck 2023-09-20 23:42:41 -04:00
3 changed files with 43 additions and 17 deletions

View File

@ -17,8 +17,9 @@ DECL_CVAR(watermark);
DECL_CVAR(watermark_rainbow);
DECL_CVAR(aim_aimbot_silent);
DECL_CVAR(visuals_friendly);
DECL_CVAR(movement_antiaim)
DECL_CVAR(movement_antiaim_view)
DECL_CVAR(movement_antiaim);
DECL_CVAR(movement_antiaim_view);
DECL_CVAR(movement_fakeduck);
bool cvars_init(void) {
@ -36,6 +37,7 @@ bool cvars_init(void) {
REGISTER_CVAR(visuals_friendly, 0);
REGISTER_CVAR(movement_antiaim, 0);
REGISTER_CVAR(movement_antiaim_view, 0);
REGISTER_CVAR(movement_fakeduck, 0);
if (IsCS16()) {
REGISTER_CVAR(visuals_tracers, 0);
} else {

View File

@ -29,29 +29,52 @@ void anti_aim(usercmd_t* cmd) {
return;
}
vec3_t random_angles;
i_engine->GetViewAngles(random_angles);
vec3_t view_angles;
i_engine->GetViewAngles(view_angles);
random_angles.x = random_float(-89.0f, 89.0f);
random_angles.y = random_float(-180.0f, 180.0f);
random_angles.z = 0.0f;
char logMsg[128];
snprintf(logMsg, sizeof(logMsg), "echo \"Generated random angles: [%f, %f, %f]\"", random_angles.x, random_angles.y, random_angles.z);
i_engine->pfnClientCmd(logMsg);
static bool lbyBreak = false;
if (lbyBreak) {
view_angles.y += 120.0f;
}
lbyBreak = !lbyBreak;
static bool flipPitch = false;
if (flipPitch) {
view_angles.x = 89.0f;
} else {
view_angles.x = -89.0f;
}
flipPitch = !flipPitch;
view_angles.y += 30.0f;
// This shit busted right now
if (CVAR_ON(movement_fakeduck) && cmd->forwardmove == 0.0f && cmd->sidemove == 0.0f) {
static int duckCounter = 0;
if (duckCounter < 5) {
cmd->buttons |= IN_DUCK;
} else if (duckCounter < 10) {
cmd->buttons &= ~IN_DUCK;
} else {
duckCounter = 0;
}
duckCounter++;
}
if (view_angles.y > 180.0f) view_angles.y -= 360.0f;
if (view_angles.y < -180.0f) view_angles.y += 360.0f;
if (CVAR_ON(movement_antiaim_view)) {
i_engine->SetViewAngles(random_angles);
i_engine->SetViewAngles(view_angles);
i_engine->pfnClientCmd("echo \"Set view angles directly using movement_antiaim_view.\"");
} else {
vec_copy(cmd->viewangles, random_angles);
vec_copy(cmd->viewangles, view_angles);
i_engine->pfnClientCmd("echo \"Set view angles silently.\"");
}
static float last_log_time = 0.0f;
if (cmd->msec - last_log_time >= 5000.0f) {
i_engine->pfnClientCmd("echo \"Anti-Aim has adjusted view angles.\"");
i_engine->pfnClientCmd("echo \"Advanced Anti-Aim has adjusted view angles.\"");
last_log_time = cmd->msec;
}
}

View File

@ -45,6 +45,7 @@ DECL_CVAR_EXTERN(aim_aimbot_silent);
DECL_CVAR_EXTERN(visuals_friendly);
DECL_CVAR_EXTERN(movement_antiaim);
DECL_CVAR_EXTERN(movement_antiaim_view);
DECL_CVAR_EXTERN(movement_fakeduck);
/*----------------------------------------------------------------------------*/