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