Don't collect previous locations unless needed

This commit is contained in:
BenCat07 2021-07-31 14:54:14 +02:00 committed by LightCat
parent 3e57dcfa9d
commit 6ecef25a49
2 changed files with 9 additions and 1 deletions

View File

@ -54,7 +54,7 @@ static settings::Float proj_start_vel{ "aimbot.projectile.initial-velocity", "0"
static settings::Float sticky_autoshoot{ "aimbot.projectile.sticky-autoshoot", "0.5" };
static settings::Boolean aimbot_debug{ "aimbot.debug", "0" };
static settings::Boolean engine_projpred{ "aimbot.debug.engine-pp", "1" };
settings::Boolean engine_projpred{ "aimbot.debug.engine-pp", "1" };
static settings::Boolean auto_spin_up{ "aimbot.auto.spin-up", "0" };
static settings::Boolean minigun_tapfire{ "aimbot.auto.tapfire", "false" };

View File

@ -9,6 +9,11 @@
#include <settings/Bool.hpp>
#include <boost/circular_buffer.hpp>
namespace hacks::shared::aimbot
{
extern settings::Boolean engine_projpred;
}
static settings::Boolean debug_pp_extrapolate{ "debug.pp-extrapolate", "false" };
static settings::Boolean debug_pp_draw{ "debug.pp-draw", "false" };
static settings::Boolean debug_pp_draw_engine{ "debug.pp-draw.engine", "false" };
@ -720,6 +725,9 @@ static InitRoutine init(
EC::CreateMove,
[]()
{
// Don't run if we don't use it
if (!hacks::shared::aimbot::engine_projpred && !debug_pp_draw)
return;
for (int i = 1; i < g_GlobalVars->maxClients; i++)
{
auto ent = ENTITY(i);