Fix Charge aimbot issues

This commit is contained in:
LightCat 2018-11-02 14:24:11 +01:00
parent a62f8ae9d8
commit 96288c5cbe

View File

@ -6,6 +6,7 @@
#include <settings/Bool.hpp> #include <settings/Bool.hpp>
#include <settings/Int.hpp> #include <settings/Int.hpp>
#include <settings/Key.hpp> #include <settings/Key.hpp>
#include <PlayerTools.hpp>
static settings::Bool enable{ "sandwichaim.enable", "false" }; static settings::Bool enable{ "sandwichaim.enable", "false" };
static settings::Button aimkey{ "sandwichaim.aimkey", "<null>" }; static settings::Button aimkey{ "sandwichaim.aimkey", "<null>" };
static settings::Int aimkey_mode{ "sandwichaim.aimkey-mode", "0" }; static settings::Int aimkey_mode{ "sandwichaim.aimkey-mode", "0" };
@ -32,6 +33,8 @@ std::pair<CachedEntity *, Vector> FindBestEnt(bool teammate, bool Predict,
continue; continue;
if (!ent->hitboxes.GetHitbox(1)) if (!ent->hitboxes.GetHitbox(1))
continue; continue;
if (!teammate && player_tools::shouldTarget(ent) != player_tools::IgnoreReason::DO_NOT_IGNORE)
continue;
Vector target{}; Vector target{};
if (Predict) if (Predict)
target = ProjectilePrediction(ent, 1, sandwich_speed, grav, target = ProjectilePrediction(ent, 1, sandwich_speed, grav,