improvements
This commit is contained in:
parent
5108a9f587
commit
ed9c32c2a4
@ -10,6 +10,7 @@
|
||||
#include <hacks/ac/bhop.hpp>
|
||||
#include <settings/Bool.hpp>
|
||||
#include "common.hpp"
|
||||
#include "PlayerTools.hpp"
|
||||
#include "hack.hpp"
|
||||
|
||||
static settings::Bool enable{ "find-cheaters.enable", "0" };
|
||||
@ -66,9 +67,15 @@ void CreateMove()
|
||||
{
|
||||
if ((CE_BYTE(ent, netvar.iLifeState) == 0))
|
||||
{
|
||||
ac::aimbot::Update(ent);
|
||||
ac::antiaim::Update(ent);
|
||||
ac::bhop::Update(ent);
|
||||
if (player_tools::shouldTarget(ent) ==
|
||||
player_tools::IgnoreReason::DO_NOT_IGNORE ||
|
||||
player_tools::shouldTarget(ent) ==
|
||||
player_tools::IgnoreReason::LOCAL_PLAYER_LIST)
|
||||
{
|
||||
ac::aimbot::Update(ent);
|
||||
ac::antiaim::Update(ent);
|
||||
ac::bhop::Update(ent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,8 @@ static settings::Int aimkey_mode{ "sandwichaim.aimkey-mode", "0" };
|
||||
|
||||
float sandwich_speed = 350.0f;
|
||||
float grav = 0.25f;
|
||||
std::pair<CachedEntity *, Vector> FindBestEnt(bool teammate, bool Predict, bool zcheck)
|
||||
std::pair<CachedEntity *, Vector> FindBestEnt(bool teammate, bool Predict,
|
||||
bool zcheck)
|
||||
{
|
||||
CachedEntity *bestent = nullptr;
|
||||
float bestscr = FLT_MAX;
|
||||
@ -21,7 +22,8 @@ std::pair<CachedEntity *, Vector> FindBestEnt(bool teammate, bool Predict, bool
|
||||
{
|
||||
CachedEntity *ent = ENTITY(i);
|
||||
if (CE_BAD(ent) || !(ent->m_bAlivePlayer()) ||
|
||||
(teammate && ent->m_iTeam() != LOCAL_E->m_iTeam()) || ent == LOCAL_E)
|
||||
(teammate && ent->m_iTeam() != LOCAL_E->m_iTeam()) ||
|
||||
ent == LOCAL_E)
|
||||
continue;
|
||||
if (!teammate && ent->m_iTeam() == LOCAL_E->m_iTeam())
|
||||
continue;
|
||||
@ -30,7 +32,7 @@ std::pair<CachedEntity *, Vector> FindBestEnt(bool teammate, bool Predict, bool
|
||||
Vector target{};
|
||||
if (Predict)
|
||||
target = ProjectilePrediction(ent, 1, sandwich_speed, grav,
|
||||
PlayerGravityMod(ent));
|
||||
PlayerGravityMod(ent));
|
||||
else
|
||||
target = ent->hitboxes.GetHitbox(1)->center;
|
||||
if (!IsEntityVectorVisible(ent, target))
|
||||
@ -42,12 +44,12 @@ std::pair<CachedEntity *, Vector> FindBestEnt(bool teammate, bool Predict, bool
|
||||
scr *= 0.1f;
|
||||
if (scr < bestscr)
|
||||
{
|
||||
bestent = ent;
|
||||
bestent = ent;
|
||||
predicted = target;
|
||||
bestscr = scr;
|
||||
bestscr = scr;
|
||||
}
|
||||
}
|
||||
return {bestent, predicted};
|
||||
return { bestent, predicted };
|
||||
}
|
||||
static HookedFunction
|
||||
SandwichAim(HookedFunctions_types::HF_CreateMove, "SandwichAim", 1, []() {
|
||||
@ -76,7 +78,7 @@ static HookedFunction
|
||||
Vector Predict;
|
||||
CachedEntity *bestent = nullptr;
|
||||
std::pair<CachedEntity *, Vector> result{};
|
||||
result = FindBestEnt(true, true, false);
|
||||
result = FindBestEnt(true, true, false);
|
||||
bestent = result.first;
|
||||
Predict = result.second;
|
||||
if (bestent)
|
||||
@ -91,26 +93,27 @@ static HookedFunction
|
||||
g_pLocalPlayer->bUseSilentAngles = true;
|
||||
}
|
||||
});
|
||||
static settings::Bool charge_aim{ "chargeaim.enable", "false"};
|
||||
static HookedFunction ChargeAimbot(HookedFunctions_types::HF_CreateMove, "ChargeAim", 1, [](){
|
||||
if (!*charge_aim)
|
||||
return;
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer())
|
||||
return;
|
||||
if (!HasCondition<TFCond_Charging>(LOCAL_E))
|
||||
return;
|
||||
std::pair<CachedEntity *, Vector> result{};
|
||||
result = FindBestEnt(false, false, true);
|
||||
CachedEntity *bestent = result.first;
|
||||
if (bestent && result.second.IsValid())
|
||||
{
|
||||
Vector tr = result.second - g_pLocalPlayer->v_Eye;
|
||||
Vector angles;
|
||||
VectorAngles(tr, angles);
|
||||
// Clamping is important
|
||||
fClampAngle(angles);
|
||||
current_user_cmd->viewangles = angles;
|
||||
current_user_cmd->buttons |= IN_ATTACK2;
|
||||
g_pLocalPlayer->bUseSilentAngles = true;
|
||||
}
|
||||
});
|
||||
static settings::Bool charge_aim{ "chargeaim.enable", "false" };
|
||||
static HookedFunction
|
||||
ChargeAimbot(HookedFunctions_types::HF_CreateMove, "ChargeAim", 1, []() {
|
||||
if (!*charge_aim)
|
||||
return;
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer())
|
||||
return;
|
||||
if (!HasCondition<TFCond_Charging>(LOCAL_E))
|
||||
return;
|
||||
std::pair<CachedEntity *, Vector> result{};
|
||||
result = FindBestEnt(false, false, true);
|
||||
CachedEntity *bestent = result.first;
|
||||
if (bestent && result.second.IsValid())
|
||||
{
|
||||
Vector tr = result.second - g_pLocalPlayer->v_Eye;
|
||||
Vector angles;
|
||||
VectorAngles(tr, angles);
|
||||
// Clamping is important
|
||||
fClampAngle(angles);
|
||||
current_user_cmd->viewangles = angles;
|
||||
current_user_cmd->buttons |= IN_ATTACK2;
|
||||
g_pLocalPlayer->bUseSilentAngles = true;
|
||||
}
|
||||
});
|
@ -361,8 +361,15 @@ bool NavToEnemy()
|
||||
{
|
||||
int nearestvalid{};
|
||||
if (!*heavy_mode)
|
||||
nearestvalid =
|
||||
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 1000, 4000);
|
||||
{
|
||||
int range = 0;
|
||||
while (nearestvalid == -1 && range < 5000)
|
||||
{
|
||||
nearestvalid =
|
||||
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 2000 - range/4 , 6000 - range);
|
||||
range += 300.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
nearestvalid =
|
||||
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 200, 1000);
|
||||
|
Reference in New Issue
Block a user