parent
33f9146268
commit
d09e882ef2
@ -563,12 +563,7 @@ bool smallBoxChecker(CachedEntity *target_entity)
|
||||
{
|
||||
if (CE_BAD(target_entity) || !g_IEntityList->GetClientEntity(target_entity->m_IDX))
|
||||
return false;
|
||||
#if ENABLE_VISUALS
|
||||
if (target_entity->m_Type() == ENTITY_PLAYER)
|
||||
{
|
||||
hacks::shared::esp::SetEntityColor(target_entity, colors::target);
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
// Just hold m1 if we were aiming at something before and are in rapidfire
|
||||
@ -753,12 +748,7 @@ CachedEntity *RetrieveBestTarget(bool aimkey_state)
|
||||
if (IsTargetStateGood(ent) && smallBoxChecker(ent) && Aim(ent))
|
||||
isTargetGood = true;
|
||||
}
|
||||
if (isTargetGood)
|
||||
{
|
||||
// Distance Priority, Uses this is melee is used
|
||||
if (GetWeaponMode() == weaponmode::weapon_melee || (int) priority_mode == 2)
|
||||
scr = 4096.0f - calculated_data_array[i].aim_position.DistTo(g_pLocalPlayer->v_Eye);
|
||||
else
|
||||
if (isTargetGood) // Melee mode straight up won't swing if the target is too far away. No need to prioritize based on distance. Just use whatever the user chooses.
|
||||
{
|
||||
switch ((int) priority_mode)
|
||||
{
|
||||
@ -790,7 +780,6 @@ CachedEntity *RetrieveBestTarget(bool aimkey_state)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Crossbow logic
|
||||
if (!ent->m_bEnemy() && ent->m_Type() == ENTITY_PLAYER && CE_GOOD(LOCAL_W) && LOCAL_W->m_iClassID() == CL_CLASS(CTFCrossbow))
|
||||
{
|
||||
@ -843,7 +832,7 @@ bool IsTargetStateGood(CachedEntity *entity)
|
||||
// Distance
|
||||
|
||||
float targeting_range = EffectiveTargetingRange();
|
||||
if (entity->m_flDistance() > targeting_range && tickcount > hacks::shared::aimbot::last_target_ignore_timer)
|
||||
if (entity->m_flDistance()-40 > targeting_range && tickcount > hacks::shared::aimbot::last_target_ignore_timer) // m_flDistance includes the collision box. You have to subtract it (Should be the same for every model)
|
||||
return false;
|
||||
|
||||
// Rage only check
|
||||
@ -948,7 +937,7 @@ bool IsTargetStateGood(CachedEntity *entity)
|
||||
// Distance
|
||||
else if (EffectiveTargetingRange())
|
||||
{
|
||||
if (entity->m_flDistance() > (int) EffectiveTargetingRange() && tickcount > hacks::shared::aimbot::last_target_ignore_timer)
|
||||
if (entity->m_flDistance()-40 > EffectiveTargetingRange() && tickcount > hacks::shared::aimbot::last_target_ignore_timer)
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -993,7 +982,7 @@ bool IsTargetStateGood(CachedEntity *entity)
|
||||
// Distance
|
||||
float targeting_range = EffectiveTargetingRange();
|
||||
|
||||
if (entity->m_flDistance() > targeting_range && tickcount > hacks::shared::aimbot::last_target_ignore_timer)
|
||||
if (entity->m_flDistance()-40 > targeting_range && tickcount > hacks::shared::aimbot::last_target_ignore_timer)
|
||||
return false;
|
||||
|
||||
// Grab the prediction var
|
||||
@ -1073,6 +1062,12 @@ bool Aim(CachedEntity *entity)
|
||||
if (slow_aim)
|
||||
DoSlowAim(angles);
|
||||
|
||||
#if ENABLE_VISUALS
|
||||
if (entity->m_Type() == ENTITY_PLAYER)
|
||||
{
|
||||
hacks::shared::esp::SetEntityColor(entity, colors::target);
|
||||
}
|
||||
#endif
|
||||
// Set angles
|
||||
current_user_cmd->viewangles = angles;
|
||||
|
||||
@ -1083,7 +1078,6 @@ bool Aim(CachedEntity *entity)
|
||||
current_user_cmd->tick_count = TIME_TO_TICKS(CE_FLOAT(entity, netvar.m_flSimulationTime));
|
||||
aimed_this_tick = true;
|
||||
viewangles_this_tick = angles;
|
||||
logging::Info("IT RAN");
|
||||
// Finish function
|
||||
return true;
|
||||
}
|
||||
@ -1099,7 +1093,7 @@ void DoAutoshoot(CachedEntity *target_entity)
|
||||
else if (IsPlayerDisguised(g_pLocalPlayer->entity) && !autoshoot_disguised)
|
||||
return;
|
||||
// Handle Huntsman/Loose cannon
|
||||
if (g_pLocalPlayer->weapon()->m_iClassID() == CL_CLASS(CTFCompoundBow) || g_pLocalPlayer->weapon()->m_iClassID() == CL_CLASS(CTFCannon))
|
||||
else if (g_pLocalPlayer->weapon()->m_iClassID() == CL_CLASS(CTFCompoundBow) || g_pLocalPlayer->weapon()->m_iClassID() == CL_CLASS(CTFCannon))
|
||||
{
|
||||
if (!only_can_shoot)
|
||||
{
|
||||
@ -1155,7 +1149,7 @@ void DoAutoshoot(CachedEntity *target_entity)
|
||||
|
||||
// Ambassador check
|
||||
|
||||
if (IsAmbassador(g_pLocalPlayer->weapon()))
|
||||
else if (IsAmbassador(g_pLocalPlayer->weapon()))
|
||||
{
|
||||
// Check if ambasador can headshot
|
||||
if (!AmbassadorCanHeadshot() && wait_for_charge)
|
||||
@ -1164,11 +1158,11 @@ void DoAutoshoot(CachedEntity *target_entity)
|
||||
|
||||
// Autoshoot breaks with Slow aimbot, so use a workaround to detect when it
|
||||
// can
|
||||
if (slow_aim && !slow_can_shoot)
|
||||
else if (slow_aim && !slow_can_shoot)
|
||||
attack = false;
|
||||
|
||||
// Dont autoshoot without anything in clip
|
||||
if (CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1) == 0)
|
||||
else if (CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1) == 0)
|
||||
attack = false;
|
||||
|
||||
if (attack)
|
||||
@ -1277,7 +1271,7 @@ int notVisibleHitbox(CachedEntity *target, int preferred)
|
||||
else
|
||||
return hitbox_t::spine_1;
|
||||
}
|
||||
int auto_hitbox(CachedEntity *target)
|
||||
int autoHitbox(CachedEntity *target)
|
||||
{
|
||||
|
||||
int preferred = 3;
|
||||
@ -1371,7 +1365,7 @@ int BestHitbox(CachedEntity *target)
|
||||
{
|
||||
case 0:
|
||||
// AUTO priority
|
||||
return auto_hitbox(target);
|
||||
return autoHitbox(target);
|
||||
break;
|
||||
case 1:
|
||||
{ // AUTO priority, return closest hitbox to crosshair
|
||||
|
Reference in New Issue
Block a user