Revert aimbot change

This commit is contained in:
julianacat 2017-07-15 17:49:13 -05:00
parent ca753b202a
commit 259e073cfb
2 changed files with 11 additions and 28 deletions

View File

@ -36,7 +36,8 @@ void EntityHitboxCache::Update() {
SAFE_CALL(InvalidateCache()); SAFE_CALL(InvalidateCache());
if (CE_BAD(parent_ref)) return; if (CE_BAD(parent_ref)) return;
} }
static CatVar add_tick(CV_SWITCH, "add_tick", "1", "Expand 2D Box", "Expand 2D box by N units");
static CatVar add_ticks(CV_INT, "add_ticks", "2", "Expand 2D Box", "Expand 2D box by N units");
void EntityHitboxCache::Init() { void EntityHitboxCache::Init() {
model_t *model; model_t *model;
studiohdr_t *shdr; studiohdr_t *shdr;
@ -45,6 +46,9 @@ void EntityHitboxCache::Init() {
m_bInit = true; m_bInit = true;
model = 0; model = 0;
if (CE_BAD(parent_ref)) return; if (CE_BAD(parent_ref)) return;
tickcount += 1;
SAFE_CALL(model = (model_t*)RAW_ENT(parent_ref)->GetModel()); SAFE_CALL(model = (model_t*)RAW_ENT(parent_ref)->GetModel());
if (!model) return; if (!model) return;
if (!m_bModelSet || model != m_pLastModel) { if (!m_bModelSet || model != m_pLastModel) {
@ -80,7 +84,7 @@ bool EntityHitboxCache::VisibilityCheck(int id) {
} }
static CatEnum setupbones_time_enum({ "ZERO", "CURTIME", "LP SERVERTIME", "SIMTIME" }); static CatEnum setupbones_time_enum({ "ZERO", "CURTIME", "LP SERVERTIME", "SIMTIME" });
static CatVar setupbones_time(setupbones_time_enum, "setupbones_time", "1", "Setupbones", "Defines setupbones 4th argument, change it if your aimbot misses, idk!!"); static CatVar setupbones_time(setupbones_time_enum, "setupbones_time", "3", "Setupbones", "Defines setupbones 4th argument, change it if your aimbot misses, idk!!");
matrix3x4_t* EntityHitboxCache::GetBones() { matrix3x4_t* EntityHitboxCache::GetBones() {
static float bones_setup_time = 0.0f; static float bones_setup_time = 0.0f;

View File

@ -526,14 +526,12 @@ bool CanAutoShoot() {
IF_GAME (IsTF2()) { IF_GAME (IsTF2()) {
if (wait_for_charge) {
// Check if players current weapon is an ambasador // Check if players current weapon is an ambasador
if (IsAmbassador(g_pLocalPlayer->weapon())) { if (IsAmbassador(g_pLocalPlayer->weapon())) {
// Check if ambasador can headshot // Check if ambasador can headshot
if (!AmbassadorCanHeadshot()) return false; if (!AmbassadorCanHeadshot()) return false;
} }
} }
}
// Don't autoshoot with the knife or bow! // Don't autoshoot with the knife or bow!
weapon_class = g_pLocalPlayer->weapon()->m_iClassID; weapon_class = g_pLocalPlayer->weapon()->m_iClassID;
@ -553,25 +551,6 @@ bool CanAutoShoot() {
// Return false due to setting not allowing autoshoot // Return false due to setting not allowing autoshoot
return false; return false;
} }
static CatVar displace(CV_INT, "displace", "4", "Expand 2D Box", "Expand 2D box by N units");
Vector SimpleThonkPrediction(CachedEntity* ent, int hb) {
if (!ent) return Vector();
Vector result;
GetHitbox(ent, hb, result);
float latency = g_IEngine->GetNetChannelInfo()->GetLatency(FLOW_OUTGOING) +
g_IEngine->GetNetChannelInfo()->GetLatency(FLOW_INCOMING);
result -= CE_VECTOR(ent, netvar.vVelocity) * (int)displace;
return result;
}
Vector SimpleDisplacementPrediction(CachedEntity* ent, int hb) {
if (!ent) return Vector();
Vector result;
GetHitbox(ent, hb, result);
Vector displacement = RAW_ENT(ent)->GetAbsOrigin() - ent->m_vecOrigin;
result += displacement;
return result;
}
// Grab a vector for a specific ent // Grab a vector for a specific ent
const Vector& PredictEntity(CachedEntity* entity) { const Vector& PredictEntity(CachedEntity* entity) {
@ -592,7 +571,7 @@ const Vector& PredictEntity(CachedEntity* entity) {
} else { } else {
// If using extrapolation, then predict a vector // If using extrapolation, then predict a vector
if (extrapolate) if (extrapolate)
result = SimpleThonkPrediction(entity, cd.hitbox); result = SimpleLatencyPrediction(entity, cd.hitbox);
// else just grab strait from the hitbox // else just grab strait from the hitbox
else else
GetHitbox(entity, cd.hitbox, result); GetHitbox(entity, cd.hitbox, result);