From 425d2023816fa52d9632d5be9400c4836fa1db75 Mon Sep 17 00:00:00 2001 From: LightCat Date: Sat, 22 Dec 2018 21:11:13 +0100 Subject: [PATCH] Auto backstab fixes --- src/hacks/Aimbot.cpp | 10 ++++++---- src/hacks/AutoBackstab.cpp | 1 + src/hacks/Backtrack.cpp | 5 ++++- src/hacks/Misc.cpp | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index aa2ef06a..52ee57ec 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -1083,6 +1083,11 @@ bool VischeckPredictedEntity(CachedEntity *entity) { // Retrieve predicted data AimbotCalculatedData_s &cd = calculated_data_array[entity->m_IDX]; + if (shouldBacktrack() && !projectile_mode) + { + cd.visible = hacks::shared::backtrack::Vischeck_Success; + return hacks::shared::backtrack::Vischeck_Success; + } if (cd.vcheck_tick == tickcount) { if (!shouldBacktrack() || projectile_mode) @@ -1091,10 +1096,7 @@ bool VischeckPredictedEntity(CachedEntity *entity) // Update info cd.vcheck_tick = tickcount; - if (!shouldBacktrack() || projectile_mode) - cd.visible = IsEntityVectorVisible(entity, PredictEntity(entity)); - else - cd.visible = hacks::shared::backtrack::Vischeck_Success; + cd.visible = IsEntityVectorVisible(entity, PredictEntity(entity)); return cd.visible; } diff --git a/src/hacks/AutoBackstab.cpp b/src/hacks/AutoBackstab.cpp index 0fb165e2..960e5697 100644 --- a/src/hacks/AutoBackstab.cpp +++ b/src/hacks/AutoBackstab.cpp @@ -113,6 +113,7 @@ static void doBacktrackStab() if (!hacks::shared::backtrack::ValidTick(i, ent)) continue; Vector angle = GetAimAtAngles(g_pLocalPlayer->v_Eye, i.hitboxes[spine_1].center); + angle.x = current_user_cmd->viewangles.x; if (!angleCheck(ent, i.entorigin, angle)) return; diff --git a/src/hacks/Backtrack.cpp b/src/hacks/Backtrack.cpp index 588337e2..20a1d2fd 100644 --- a/src/hacks/Backtrack.cpp +++ b/src/hacks/Backtrack.cpp @@ -251,7 +251,10 @@ bool shouldBacktrack() float getLatency() { - return *latency; + auto ch = (INetChannel *)g_IEngine->GetNetChannelInfo(); + if (!ch) + return 0; + return *latency - ch->GetLatency(MAX_FLOWS); } int getTicks() diff --git a/src/hacks/Misc.cpp b/src/hacks/Misc.cpp index 5a606dda..b38607b3 100644 --- a/src/hacks/Misc.cpp +++ b/src/hacks/Misc.cpp @@ -393,7 +393,7 @@ void DrawText() } #endif - +/* void Schema_Reload() { logging::Info("Custom schema loading is not supported right now."); @@ -431,7 +431,7 @@ void Schema_Reload() logging::Info("Loading %s", ret ? "Successful" : "Unsuccessful"); } CatCommand schema("schema", "Load custom schema", Schema_Reload); - +*/ CatCommand name("name_set", "Immediate name change", [](const CCommand &args) { if (args.ArgC() < 2) {