Autobacktrackstab improvements
This commit is contained in:
parent
b3cb3eb437
commit
7b2dc6d856
@ -3,10 +3,18 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <core/interfaces.hpp>
|
||||
#include <core/sdk.hpp>
|
||||
#include <globals.h>
|
||||
#include <core/netvars.hpp>
|
||||
#include <settings/Bool.hpp>
|
||||
#include <localplayer.hpp>
|
||||
#include <entitycache.hpp>
|
||||
|
||||
namespace hacks::shared::anti_anti_aim
|
||||
{
|
||||
|
||||
void createMove();
|
||||
void resolveEnt(int IDX, IClientEntity *entity = nullptr);
|
||||
|
||||
}
|
@ -16,7 +16,7 @@ int prevflowticks = 0;
|
||||
|
||||
bool *bSendPackets{ nullptr };
|
||||
|
||||
settings::Bool crypt_chat{ "chat.crypto", "false" };
|
||||
settings::Bool crypt_chat{ "chat.crypto", "true" };
|
||||
settings::Bool clean_screenshots{ "visual.clean-screenshots", "false" };
|
||||
settings::Bool nolerp{ "misc.no-lerp", "false" };
|
||||
settings::Bool no_zoom{ "remove.scope", "false" };
|
||||
|
@ -3,13 +3,6 @@
|
||||
*/
|
||||
|
||||
#include <hacks/AntiAntiAim.hpp>
|
||||
#include <core/interfaces.hpp>
|
||||
#include <core/sdk.hpp>
|
||||
#include <globals.h>
|
||||
#include <core/netvars.hpp>
|
||||
#include <settings/Bool.hpp>
|
||||
#include <localplayer.hpp>
|
||||
#include <entitycache.hpp>
|
||||
|
||||
static settings::Bool enable{ "anti-anti-aim.enable", "false" };
|
||||
|
||||
@ -23,15 +16,21 @@ void hacks::shared::anti_anti_aim::createMove()
|
||||
IClientEntity *entity{ nullptr };
|
||||
for (int i = 0; i < g_IEngine->GetMaxClients(); i++)
|
||||
{
|
||||
if (i == g_IEngine->GetLocalPlayer())
|
||||
continue;
|
||||
entity = g_IEntityList->GetClientEntity(i);
|
||||
resolveEnt(i, entity);
|
||||
}
|
||||
}
|
||||
|
||||
void hacks::shared::anti_anti_aim::resolveEnt(int IDX, IClientEntity *entity)
|
||||
{
|
||||
if (IDX == g_IEngine->GetLocalPlayer())
|
||||
return;
|
||||
entity = g_IEntityList->GetClientEntity(IDX);
|
||||
if (entity && !entity->IsDormant() && !NET_BYTE(entity, netvar.iLifeState))
|
||||
{
|
||||
float quotat = 0;
|
||||
float quotaf = 0;
|
||||
if (!g_Settings.brute.choke[i].empty())
|
||||
for (auto it : g_Settings.brute.choke[i])
|
||||
if (!g_Settings.brute.choke[IDX].empty())
|
||||
for (auto it : g_Settings.brute.choke[IDX])
|
||||
{
|
||||
if (it)
|
||||
quotat++;
|
||||
@ -41,9 +40,9 @@ void hacks::shared::anti_anti_aim::createMove()
|
||||
float quota = quotat / quotaf;
|
||||
Vector &angles = NET_VECTOR(entity, netvar.m_angEyeAngles);
|
||||
static bool brutepitch = false;
|
||||
if (g_Settings.brute.brutenum[i] > 5)
|
||||
if (g_Settings.brute.brutenum[IDX] > 5)
|
||||
{
|
||||
g_Settings.brute.brutenum[i] = 0;
|
||||
g_Settings.brute.brutenum[IDX] = 0;
|
||||
brutepitch = !brutepitch;
|
||||
}
|
||||
angles.y = fmod(angles.y + 180.0f, 360.0f);
|
||||
@ -51,7 +50,7 @@ void hacks::shared::anti_anti_aim::createMove()
|
||||
angles.y += 360.0f;
|
||||
angles.y -= 180.0f;
|
||||
if (quota < 0.8f)
|
||||
switch (g_Settings.brute.brutenum[i])
|
||||
switch (g_Settings.brute.brutenum[IDX])
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@ -72,7 +71,7 @@ void hacks::shared::anti_anti_aim::createMove()
|
||||
break;
|
||||
}
|
||||
if (brutepitch || quota < 0.8f)
|
||||
switch (g_Settings.brute.brutenum[i] % 4)
|
||||
switch (g_Settings.brute.brutenum[IDX] % 4)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@ -88,5 +87,3 @@ void hacks::shared::anti_anti_aim::createMove()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "hacks/Backtrack.hpp"
|
||||
#include "hacks/Aimbot.hpp"
|
||||
#include "hacks/Trigger.hpp"
|
||||
#include "hacks/AntiAntiAim.hpp"
|
||||
|
||||
static settings::Bool enable{ "autobackstab.enable", "0" };
|
||||
static settings::Bool silent{ "autobackstab.silent", "1" };
|
||||
@ -45,13 +46,6 @@ const Vector GetWorldSpaceCenter(CachedEntity *ent)
|
||||
return vWorldSpaceCenter;
|
||||
}
|
||||
|
||||
std::pair<Vector, Vector> GetHitboxBounds(CachedEntity *it, int hitbox)
|
||||
{
|
||||
std::pair<Vector, Vector> result(it->hitboxes.GetHitbox(hitbox)->min,
|
||||
it->hitboxes.GetHitbox(hitbox)->max);
|
||||
return result;
|
||||
}
|
||||
|
||||
void traceEntity(int *result_eindex, Vector *result_pos, QAngle angle,
|
||||
Vector loc, float meleeRange)
|
||||
{
|
||||
@ -102,10 +96,9 @@ bool canBackstab(CachedEntity *tar, Vector angle, Vector loc, Vector hitboxLoc)
|
||||
}
|
||||
|
||||
bool canBacktrackStab(hacks::shared::backtrack::BacktrackData &i,
|
||||
Vector vecAngle, Vector loc, Vector hitboxLoc)
|
||||
Vector vecAngle, Vector loc, Vector hitboxLoc, float targetAngle)
|
||||
{
|
||||
float meleeRange = re::C_TFWeaponBaseMelee::GetSwingRange(RAW_ENT(LOCAL_W));
|
||||
float targetAngle = i.viewangles;
|
||||
if (fabsf(vecAngle.y - targetAngle) >= 45)
|
||||
return false;
|
||||
if (loc.DistTo(hitboxLoc) > meleeRange)
|
||||
@ -182,6 +175,7 @@ void CreateMove()
|
||||
}
|
||||
if (CE_GOOD(besttarget))
|
||||
{
|
||||
hacks::shared::anti_anti_aim::resolveEnt(besttarget->m_IDX);
|
||||
Vector angle = NET_VECTOR(RAW_ENT(LOCAL_E), netvar.m_angEyeAngles);
|
||||
if (!hacks::shared::backtrack::isBacktrackEnabled())
|
||||
{
|
||||
@ -242,7 +236,7 @@ void CreateMove()
|
||||
for (angle.y = -180.0f; angle.y < 180.0f; angle.y += 40.0f)
|
||||
{
|
||||
if (canBacktrackStab(i, angle, g_pLocalPlayer->v_Eye,
|
||||
i.spine))
|
||||
i.spine, NET_VECTOR(RAW_ENT(besttarget), netvar.m_angEyeAngles).y))
|
||||
{
|
||||
current_user_cmd->tick_count = i.tickcount;
|
||||
current_user_cmd->viewangles = angle;
|
||||
|
Reference in New Issue
Block a user