improvements

This commit is contained in:
bencat07 2018-10-03 11:14:08 +02:00
parent 5108a9f587
commit ed9c32c2a4
3 changed files with 52 additions and 35 deletions

View File

@ -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" };
@ -65,6 +66,11 @@ void CreateMove()
if (CE_GOOD(ent))
{
if ((CE_BYTE(ent, netvar.iLifeState) == 0))
{
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);
@ -72,6 +78,7 @@ void CreateMove()
}
}
}
}
}
void ResetPlayer(int index)

View File

@ -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;
@ -47,7 +49,7 @@ std::pair<CachedEntity *, Vector> FindBestEnt(bool teammate, bool Predict, bool
bestscr = scr;
}
}
return {bestent, predicted};
return { bestent, predicted };
}
static HookedFunction
SandwichAim(HookedFunctions_types::HF_CreateMove, "SandwichAim", 1, []() {
@ -91,8 +93,9 @@ static HookedFunction
g_pLocalPlayer->bUseSilentAngles = true;
}
});
static settings::Bool charge_aim{ "chargeaim.enable", "false"};
static HookedFunction ChargeAimbot(HookedFunctions_types::HF_CreateMove, "ChargeAim", 1, [](){
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())
@ -113,4 +116,4 @@ static HookedFunction ChargeAimbot(HookedFunctions_types::HF_CreateMove, "Charge
current_user_cmd->buttons |= IN_ATTACK2;
g_pLocalPlayer->bUseSilentAngles = true;
}
});
});

View File

@ -361,8 +361,15 @@ bool NavToEnemy()
{
int nearestvalid{};
if (!*heavy_mode)
{
int range = 0;
while (nearestvalid == -1 && range < 5000)
{
nearestvalid =
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 1000, 4000);
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 2000 - range/4 , 6000 - range);
range += 300.0f;
}
}
else
nearestvalid =
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 200, 1000);