This repository has been archived on 2024-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
cathook/include/hacks/Aimbot.hpp
2019-05-26 14:00:35 +02:00

58 lines
1.4 KiB
C++

/*
* HAimbot.h
*
* Created on: Oct 8, 2016
* Author: nullifiedcat
*/
#pragma once
#include "common.hpp"
class ConVar;
class IClientEntity;
namespace hacks::shared::aimbot
{
bool IsBacktracking();
extern settings::Boolean ignore_cloak;
// Used to store aimbot data to prevent calculating it again
struct AimbotCalculatedData_s
{
unsigned long predict_tick{ 0 };
Vector aim_position{ 0 };
unsigned long vcheck_tick{ 0 };
bool visible{ false };
float fov{ 0 };
int hitbox{ 0 };
};
// Functions used to calculate aimbot data, and if already calculated use it
const Vector &PredictEntity(CachedEntity *entity);
bool VischeckPredictedEntity(CachedEntity *entity, bool Backtracking);
bool BacktrackVisCheck(CachedEntity *entity);
// Variable used to tell when the aimbot has found a target
extern bool foundTarget;
// Used by esp to set their color
extern int target_eid;
// Functions called by other functions for when certian game calls are run
void Reset();
// Stuff to make storing functions easy
CachedEntity *CurrentTarget();
bool ShouldAim();
CachedEntity *RetrieveBestTarget(bool aimkey_state, bool Backtracking = false);
bool IsTargetStateGood(CachedEntity *entity);
void Aim(CachedEntity *entity);
void DoAutoshoot();
int BestHitbox(CachedEntity *target);
int ClosestHitbox(CachedEntity *target);
void DoSlowAim(Vector &inputAngle);
bool UpdateAimkey();
float EffectiveTargetingRange();
} // namespace hacks::shared::aimbot