Auto backstab fixes

This commit is contained in:
LightCat 2018-12-22 21:11:13 +01:00
parent b6aaef349e
commit 425d202381
4 changed files with 13 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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()

View File

@ -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)
{