aimbot smooth

This commit is contained in:
Oscar 2025-07-17 13:59:28 +03:00
parent e8b1d227cc
commit 4d216b662b
7 changed files with 100 additions and 84 deletions

View File

@ -49,4 +49,5 @@ namespace Config {
bool rcs = 0; bool rcs = 0;
bool fov_circle = 0; bool fov_circle = 0;
ImVec4 fovCircleColor = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); ImVec4 fovCircleColor = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
float aimbot_smooth = 0.f;
} }

View File

@ -48,4 +48,5 @@ namespace Config {
extern bool rcs; extern bool rcs;
extern bool fov_circle; extern bool fov_circle;
extern ImVec4 fovCircleColor; extern ImVec4 fovCircleColor;
extern float aimbot_smooth;
} }

View File

@ -119,6 +119,7 @@ namespace internal_config
j["antiflash"] = Config::antiflash; j["antiflash"] = Config::antiflash;
j["rcs"] = Config::rcs; j["rcs"] = Config::rcs;
j["fov_circle"] = Config::fov_circle; j["fov_circle"] = Config::fov_circle;
j["aimbot_smooth"] = Config::aimbot_smooth;
j["enemyChamsInvisible"] = Config::enemyChamsInvisible; j["enemyChamsInvisible"] = Config::enemyChamsInvisible;
j["enemyChams"] = Config::enemyChams; j["enemyChams"] = Config::enemyChams;
@ -217,6 +218,7 @@ namespace internal_config
Config::aimbot = j.value("aimbot", false); Config::aimbot = j.value("aimbot", false);
Config::rcs = j.value("rcs", false); Config::rcs = j.value("rcs", false);
Config::aimbot_fov = j.value("aimbot_fov", 0.f); Config::aimbot_fov = j.value("aimbot_fov", 0.f);
Config::aimbot_smooth = j.value("aimbot_smooth", 0.f);
Config::antiflash = j.value("antiflash", false); Config::antiflash = j.value("antiflash", false);

View File

@ -62,7 +62,7 @@ void Aimbot() {
int nMaxHighestEntity = I::GameEntity->Instance->GetHighestEntityIndex(); int nMaxHighestEntity = I::GameEntity->Instance->GetHighestEntityIndex();
float bestFov = Config::aimbot_fov; float bestFov = Config::aimbot_fov;
C_CSPlayerPawn* bestTarget = nullptr; C_CSPlayerPawn* bestTarget = nullptr;
QAngle_t bestAngle = {0, 0, 0}; QAngle_t bestAngle = { 0, 0, 0 };
for (int i = 1; i <= nMaxHighestEntity; i++) { for (int i = 1; i <= nMaxHighestEntity; i++) {
auto Entity = I::GameEntity->Instance->Get(i); auto Entity = I::GameEntity->Instance->Get(i);
@ -81,8 +81,8 @@ void Aimbot() {
continue; continue;
if (pawn->getHealth() <= 0) if (pawn->getHealth() <= 0)
continue; continue;
/* if (!Config::team_check && pawn->getTeam() == lp->getTeam()) if (!Config::team_check && pawn->getTeam() == lp->getTeam())
continue;*/ continue;
Vector_t eye_pos = GetEntityEyePos(pawn); Vector_t eye_pos = GetEntityEyePos(pawn);
QAngle_t angle = CalcAngles(eye_pos, lep); QAngle_t angle = CalcAngles(eye_pos, lep);
angle.x *= -1.f; angle.x *= -1.f;
@ -107,7 +107,8 @@ void Aimbot() {
// Проверяем, что цель всё ещё валидна // Проверяем, что цель всё ещё валидна
if (!lockedTarget->handle().valid() || lockedTarget->getHealth() <= 0) { if (!lockedTarget->handle().valid() || lockedTarget->getHealth() <= 0) {
lockedTarget = nullptr; lockedTarget = nullptr;
} else { }
else {
Vector_t eye_pos = GetEntityEyePos(lockedTarget); Vector_t eye_pos = GetEntityEyePos(lockedTarget);
QAngle_t angle = CalcAngles(eye_pos, lep); QAngle_t angle = CalcAngles(eye_pos, lep);
angle.x *= -1.f; angle.x *= -1.f;
@ -117,8 +118,18 @@ void Aimbot() {
angle -= ang_punch_angle * 2.f; angle -= ang_punch_angle * 2.f;
angle.z = 0.f; angle.z = 0.f;
angle = angle.Normalize(); angle = angle.Normalize();
if (Config::aimbot_smooth > 0.f) {
QAngle_t cur = *viewangles;
QAngle_t delta = (angle - cur).Normalize();
float smooth = Config::aimbot_smooth;
angle = cur + delta * (1.f / smooth);
angle = angle.Normalize();
*viewangles = angle; *viewangles = angle;
} }
else {
*viewangles = angle;
}
}
} }
prevAimbotState = aimbotActive; prevAimbotState = aimbotActive;

View File

@ -146,6 +146,7 @@ void Menu::render() {
ImGui::Checkbox("Team Check", &Config::team_check); ImGui::Checkbox("Team Check", &Config::team_check);
ImGui::SliderFloat("FOV", &Config::aimbot_fov, 0.f, 90.f); ImGui::SliderFloat("FOV", &Config::aimbot_fov, 0.f, 90.f);
ImGui::SliderFloat("Smooth", &Config::aimbot_smooth, 0.f, 10.f, "%.2f");
ImGui::Checkbox("Draw FOV Circle", &Config::fov_circle); ImGui::Checkbox("Draw FOV Circle", &Config::fov_circle);
if (Config::fov_circle) { if (Config::fov_circle) {
ImGui::ColorEdit4("Circle Color##FovColor", (float*)&Config::fovCircleColor); ImGui::ColorEdit4("Circle Color##FovColor", (float*)&Config::fovCircleColor);

Binary file not shown.

Binary file not shown.