diff --git a/include/hacks/AntiAim.hpp b/include/hacks/AntiAim.hpp index 274c63eb..835a7fef 100755 --- a/include/hacks/AntiAim.hpp +++ b/include/hacks/AntiAim.hpp @@ -13,12 +13,6 @@ class CUserCmd; namespace hacks::shared::antiaim { -// TODO paste AA from AimTux - -extern CatVar enabled; -extern CatVar communicate; -extern CatVar yaw_mode; - extern int safe_space; void SetSafeSpace(int safespace); diff --git a/src/hacks/Announcer.cpp b/src/hacks/Announcer.cpp index fa08b588..64e1efce 100644 --- a/src/hacks/Announcer.cpp +++ b/src/hacks/Announcer.cpp @@ -5,13 +5,14 @@ * Author: nullifiedcat */ +#include #include "common.hpp" +static settings::Bool enable{ "announcer", "false" }; + namespace hacks::shared::announcer { -static CatVar enabled(CV_SWITCH, "announcer", "0", "Enable announcer"); - struct announcer_entry_s { int count; @@ -151,7 +152,7 @@ class AnnouncerEventListener : public IGameEventListener2 { virtual void FireGameEvent(IGameEvent *event) { - if (!enabled) + if (!enable) return; if (0 == strcmp(event->GetName(), "player_death")) on_kill(event); diff --git a/src/hacks/AntiAim.cpp b/src/hacks/AntiAim.cpp index 742fdf74..b5a91484 100644 --- a/src/hacks/AntiAim.cpp +++ b/src/hacks/AntiAim.cpp @@ -7,60 +7,39 @@ #include #include +#include #include "common.hpp" +static settings::Bool communicate{ "antiaim.identify", "0" }; +static settings::Bool enable{ "antiaim.enable", "0" }; +static settings::Bool crouch{ "antiaim.fake-crouch", "0" }; + +static settings::Float yaw{ "antiaim.yaw.static", "0" }; +static settings::Int yaw_mode{ "antiaim.yaw.mode", "0" }; + +static settings::Float pitch{ "antiaim.pitch.static", "0" }; +static settings::Int pitch_mode{ "antiaim.pitch.mode", "0" }; + +static settings::Float roll{ "antiaim.roll", "0" }; +static settings::Bool no_clamping{ "antiaim.no-clamp", "0" }; +static settings::Float spin{ "antiaim.spin-speed", "10" }; + +static settings::Bool aaaa_enable{ "antiaim.aaaa.enable", "0" }; +static settings::Float aaaa_interval{ "antiaim.aaaa.interval.seconds", "0" }; +static settings::Float aaaa_interval_random_high{ "antiaim.aaaa.interval.random-high"}; +static settings::Float aaaa_interval_random_low{ "antiaim.aaaa.interval.random-low"}; +static settings::Int aaaa_mode{ "antiaim.aaaa.mode", "0" }; +static settings::Button aaaa_flip_key{ "antiaim.aaaa.flip-key", "" }; + +static settings::Bool test{ "antiaim.debug", "0" }; + +#if ENABLE_VISUALS +static settings::Bool draw_fakes{ "antiaim.draw-fakes", "1" }; +#endif + namespace hacks::shared::antiaim { -CatVar communicate(CV_SWITCH, "identify", "0", "identify", - "Auto identify for other cathook users"); -CatVar enabled(CV_SWITCH, "aa_enabled", "0", "Anti-Aim", - "Master AntiAim switch"); -CatVar draw_fakes(CV_SWITCH, "aa_drawfakes", "1", "Draw Fakes", - "Draw a nice box around the head hitboxes"); -static CatVar crouch(CV_SWITCH, "aa_fakecrouch", "0", "Fake Crouch", - "Fake crouch"); -static CatVar yaw(CV_FLOAT, "aa_yaw", "0.0", "Yaw", "Static yaw (left/right)", - 360.0); -static CatVar pitch(CV_FLOAT, "aa_pitch", "-89.0", "Pitch", - "Static pitch (up/down)", -89.0, 89.0); -static CatEnum yaw_mode_enum({ "KEEP", "STATIC", "JITTER", - "BIGRANDOM", "RANDOM", "SPIN", - "OFFSETKEEP", "EDGE", "HECK", - "FAKEKEEP", "FAKESTATIC", "FAKEJITTER", - "FAKEBIGRANDOM", "FAKERANDOM", "FAKESPIN", - "FAKEOFFSETKEEP", "FAKEEDGE", "FAKEHECK", - "FAKESIDEWAYS", "FAKELEFT", "FAKERIGHT", - "FAKEREVERSEEDGE" }); -static CatEnum pitch_mode_enum({ "KEEP", "STATIC", "JITTER", "RANDOM", "FLIP", - "FAKEFLIP", "FAKEUP", "FAKEDOWN", "FAKECENTER", - "UP", "DOWN", "HECK" }); -CatVar yaw_mode(yaw_mode_enum, "aa_yaw_mode", "0", "Yaw mode", "Yaw mode"); -static CatVar pitch_mode(pitch_mode_enum, "aa_pitch_mode", "0", "Pitch mode", - "Pitch mode"); -static CatVar roll(CV_FLOAT, "aa_roll", "0", "Roll", - "Roll angle (viewangles.z)", -180, 180); -static CatVar - no_clamping(CV_SWITCH, "aa_no_clamp", "0", "Don't clamp angles", - "Use this with STATIC mode for unclamped manual angles"); -static CatVar spin(CV_FLOAT, "aa_spin", "10.0", "Spin speed", - "Spin speed (degrees/second)"); -static CatVar aaaa_enabled(CV_SWITCH, "aa_aaaa_enabled", "0", "Enable AAAA", - "Enable Anti-Anti-Anti-Aim (Overrides AA Pitch)"); -static CatVar aaaa_interval(CV_FLOAT, "aa_aaaa_interval", "0", "Interval", - "Interval in seconds, 0 = random"); -static CatVar aaaa_interval_random_high(CV_FLOAT, "aa_aaaa_interval_high", "15", - "Interval Ceiling", - "Upper bound for random AAAA interval"); -static CatVar aaaa_interval_random_low(CV_FLOAT, "aa_aaaa_interval_low", "3", - "Interval Floor", - "Lower bound for random AAAA interval"); -static CatEnum aaaa_modes_enum({ "(FAKE)UP", "(FAKE)DOWN", "(FAKE)CENTER" }); -static CatVar aaaa_mode(aaaa_modes_enum, "aa_aaaa_mode", "0", "Mode", - "Anti-Anti-Anti-Aim Mode"); -static CatVar aaaa_flip_key(CV_KEY, "aa_aaaa_flip_key", "0", "Flip key", - "If you press that key, current AA will change"); -static CatVar test(CV_KEY, "aa_test", "0", "debug", "test"); float cur_yaw = 0.0f; int safe_space = 0; @@ -108,7 +87,7 @@ void NextAAAA() void UpdateAAAAKey() { - if (g_IInputSystem->IsButtonDown((ButtonCode_t)(int) aaaa_flip_key)) + if (aaaa_flip_key.isKeyDown()) { if (!aaaa_key_pressed) { @@ -426,7 +405,7 @@ void FakeCrouch(CUserCmd *cmd) } void ProcessUserCmd(CUserCmd *cmd) { - if (!enabled) + if (!enable) { *bSendPackets = true; return; @@ -628,7 +607,7 @@ void ProcessUserCmd(CUserCmd *cmd) fClampAngle(cmd->viewangles); if (roll) cmd->viewangles.z = float(roll); - if (aaaa_enabled) + if (aaaa_enable) { UpdateAAAAKey(); UpdateAAAATimer(); diff --git a/src/hacks/AntiBackstab.cpp b/src/hacks/AntiBackstab.cpp index e700877b..80fc076d 100644 --- a/src/hacks/AntiBackstab.cpp +++ b/src/hacks/AntiBackstab.cpp @@ -5,20 +5,19 @@ * Author: nullifiedcat */ +#include #include "common.hpp" #include "hack.hpp" +static settings::Bool enable{ "antibackstab.enable", "0" }; +static settings::Float distance{ "antibackstab.distance", "200" }; +static settings::Bool silent{ "antibackstab.silent", "1" }; +static settings::Float angle{ "antibackstab.angle", "90" }; +static settings::Bool sayno{ "antibackstab.nope", "0" }; + namespace hacks::tf2::antibackstab { bool noaa = false; -static CatVar enabled(CV_SWITCH, "antibackstab", "0", "Enable", - "Main anti-backstab switch"); -static CatVar distance(CV_FLOAT, "antibackstab_distance", "200", "Distance", - "Distance Until anti-backstab reacts"); -static CatVar silent(CV_SWITCH, "antibackstab_silent", "1", "Silent", - "Works silently without moving your view"); -static CatVar angle(CV_FLOAT, "antibackstab_angle", "90", "Detection Angle"); -static CatVar sayno(CV_SWITCH, "antibackstab_nope", "0", "Nope!", "Memes"); void SayNope() { @@ -93,7 +92,7 @@ void CreateMove() CachedEntity *spy; Vector diff; - if (!enabled) + if (!enable) return; spy = ClosestSpy(); ConVar *pitchdown = g_ICvar->FindVar("cl_pitchdown"); diff --git a/src/hacks/AntiCheat.cpp b/src/hacks/AntiCheat.cpp index cec897c7..b1339752 100644 --- a/src/hacks/AntiCheat.cpp +++ b/src/hacks/AntiCheat.cpp @@ -8,14 +8,17 @@ #include #include #include +#include #include "common.hpp" #include "hack.hpp" +static settings::Bool enable{ "find-cheaters.enable", "0" }; +static settings::Bool accuse_chat{ "find-cheaters.accuse-in-chat", "0" }; +static settings::Bool autorage{ "find-cheaters.auto-rage", "0" }; +static settings::Bool skip_local{ "find-cheaters.ignore-local", "1" }; + namespace hacks::shared::anticheat { -static CatVar enabled(CV_SWITCH, "ac_enabled", "0", "Enable AC"); -static CatVar accuse_chat(CV_SWITCH, "ac_chat", "0", "Accuse in chat"); -static CatVar autorage(CV_SWITCH, "ac_autorage", "0", "Auto Rage"); void Accuse(int eid, const std::string &hack, const std::string &details) { @@ -40,8 +43,6 @@ void Accuse(int eid, const std::string &hack, const std::string &details) } } -static CatVar skip_local(CV_SWITCH, "ac_ignore_local", "1", "Ignore Local"); - void SetRage(player_info_t info) { if (autorage) @@ -51,7 +52,7 @@ void SetRage(player_info_t info) void CreateMove() { - if (!enabled) + if (!enable) return; angles::Update(); for (int i = 1; i < 33; i++) @@ -90,7 +91,7 @@ class ACListener : public IGameEventListener public: virtual void FireGameEvent(KeyValues *event) { - if (!enabled) + if (!enable) return; std::string name(event->GetName()); if (name == "player_activate") diff --git a/src/hacks/AntiDisguise.cpp b/src/hacks/AntiDisguise.cpp index 4a0289ed..da974871 100644 --- a/src/hacks/AntiDisguise.cpp +++ b/src/hacks/AntiDisguise.cpp @@ -5,16 +5,15 @@ * Author: nullifiedcat */ +#include #include "common.hpp" +static settings::Bool enable{ "remove.disguise", "0" }; +static settings::Bool no_invisibility{ "remove.cloak", "0" }; + namespace hacks::tf2::antidisguise { -static CatVar enabled(CV_SWITCH, "antidisguise", "0", "Remove spy disguise", - "Removes the disguise from spys\nUsefull for aimbot"); -static CatVar no_invisibility(CV_SWITCH, "no_invis", "0", "Remove Invisibility", - "Useful with chams!"); - void Draw() { CachedEntity *ent; @@ -33,7 +32,7 @@ void Draw() } } } - if (!enabled) + if (!enable) return; for (int i = 0; i < g_IEngine->GetMaxClients(); i++) { diff --git a/src/hacks/AutoBackstab.cpp b/src/hacks/AutoBackstab.cpp index 16455995..b0d49de2 100644 --- a/src/hacks/AutoBackstab.cpp +++ b/src/hacks/AutoBackstab.cpp @@ -5,8 +5,13 @@ * Author: nullifiedcat */ +#include #include "common.hpp" #include "hacks/Backtrack.hpp" + +static settings::Bool enable{ "autobackstab.enable", "0" }; +static settings::Bool silent{ "autobackstab.silent", "1" }; + namespace hacks::tf2::autobackstab { @@ -20,9 +25,6 @@ const Vector GetWorldSpaceCenter(CachedEntity *ent) return vWorldSpaceCenter; } -static CatVar enabled(CV_SWITCH, "autobackstab", "0", "Auto Backstab", - "Does not depend on triggerbot!"); -static CatVar silent(CV_SWITCH, "autobackstab_silent", "1", "Silent"); bool found; std::pair GetHitboxBounds(CachedEntity *it, int hitbox) { diff --git a/src/hacks/AutoDeadringer.cpp b/src/hacks/AutoDeadringer.cpp index b5406f9e..d79e0908 100644 --- a/src/hacks/AutoDeadringer.cpp +++ b/src/hacks/AutoDeadringer.cpp @@ -5,13 +5,12 @@ * Author: bencat07 */ #include "common.hpp" + +static settings::Bool enable{ "auto-deadringer.enable", "0" }; +static settings::Int trigger_health{ "auto-deadringer.health", "30" }; + namespace hacks::shared::deadringer { -static CatVar - enabled(CV_SWITCH, "deadringer_auto", "0", "Auto deadringer", - "automatically pull out DR on low health or projectile nearby"); -static CatVar trigger_health(CV_SWITCH, "deadringer_health", "30", "Health", - "Trigger on this much health or less"); bool IsProjectile(CachedEntity *ent) { @@ -46,7 +45,7 @@ int NearbyEntities() } void CreateMove() { - if (!enabled) + if (!enable) return; if (CE_BAD(LOCAL_E)) return; diff --git a/src/hacks/AutoDetonator.cpp b/src/hacks/AutoDetonator.cpp index 2e68c7b6..8d65cb84 100644 --- a/src/hacks/AutoDetonator.cpp +++ b/src/hacks/AutoDetonator.cpp @@ -6,18 +6,15 @@ */ #include +#include #include "common.hpp" +static settings::Bool enable{ "auto-detonator.enable", "0" }; +static settings::Bool legit{ "auto-detonator.ignore-cloaked", "0" }; + namespace hacks::tf::autodetonator { -// Vars for user settings -static CatVar enabled(CV_SWITCH, "detonator_enabled", "0", - "Auto-Detonator-detonator", - "Master auto detonator switch"); -static CatVar legit(CV_SWITCH, "detonator_legit", "0", "Ignore invis", - "Ignores invis spies"); - // A storage array for ents std::vector flares; std::vector targets; @@ -81,7 +78,7 @@ bool IsTarget(CachedEntity *ent) void CreateMove() { // Check user settings if auto detonator is enabled - if (!enabled) + if (!enable) return; // Check if player is pyro diff --git a/src/hacks/AutoHeal.cpp b/src/hacks/AutoHeal.cpp index 769c538f..0bc1f2b5 100644 --- a/src/hacks/AutoHeal.cpp +++ b/src/hacks/AutoHeal.cpp @@ -8,43 +8,48 @@ #include "common.hpp" #include #include +#include + +static settings::Bool enable{ "autoheal.enable", "false" }; +static settings::Bool silent{ "autoheal.silent", "true" }; +static settings::Bool pop_uber_auto{ "autoheal.uber.enable", "true" }; +static settings::Float pop_uber_percent{ "autoheal.uber.health-below-ratio", "0" }; +static settings::Bool share_uber{ "autoheal.uber.share", "true" }; + +static settings::Bool auto_vacc{ "autoheal.vacc.enable", "false" }; + +static settings::Bool auto_vacc_bullets{ "autoheal.vacc.bullets.enable", "true" }; +static settings::Int vacc_sniper{ "autoheal.vacc.bullets.sniper-pop", "true" }; + +static settings::Bool auto_vacc_fire_checking{ "autoheal.vacc.fire.enable", "true" }; +static settings::Int auto_vacc_pop_if_pyro{ "autoheal.vacc.fire.pyro-pop", "1" }; +static settings::Bool auto_vacc_check_on_fire{ "autoheal.vacc.fire.prevent-afterburn", "true" }; +static settings::Int auto_vacc_pyro_range{ "autoheal.vacc.fire.pyro-range", "450" }; + +static settings::Bool auto_vacc_blast_checking{ "autoheal.vacc.blast.enable", "true" }; +static settings::Bool auto_vacc_blast_crit_pop{ "autoheal.vacc.blast.crit-pop", "true" }; +static settings::Int auto_vacc_blast_health{ "autoheal.vacc.blast.pop-near-rocket-health", "80" }; +static settings::Int auto_vacc_proj_danger_range{ "autoheal.vacc.blast.danger-range", "650" }; + +static settings::Int change_timer{ "autoheal.vacc.reset-timer", "200" }; + +static settings::Int auto_vacc_bullet_pop_ubers{ "autoheal.vacc.bullet.min-charges", "0" }; +static settings::Int auto_vacc_fire_pop_ubers{ "autoheal.vacc.fire.min-charges", "0" }; +static settings::Int auto_vacc_blast_pop_ubers{ "autoheal.vacc.blast.min-charges", "0" }; + +static settings::Int default_resistance{ "autoheal.vacc.default-resistance", "0" }; namespace hacks::tf::autoheal { -static CatVar enabled(CV_SWITCH, "autoheal_enabled", "0", "AutoHeal", - "Automatically heals nearby teammates"); -static CatVar silent(CV_SWITCH, "autoheal_silent", "1", "Silent AutoHeal", - "Silent AutoHeal. Disable this to make ghetto followbot"); -// extern CatVar target_only; - int m_iCurrentHealingTarget{ -1 }; int m_iNewTarget{ 0 }; -static CatVar pop_uber_auto(CV_SWITCH, "autoheal_uber", "1", "AutoUber", - "Use ubercharge automatically"); -static CatVar - pop_uber_percent(CV_FLOAT, "autoheal_uber_health", "0", - "Pop uber if health% <", - "When under a percentage of health, use ubercharge"); -static CatVar share_uber( - CV_SWITCH, "autoheal_share_uber", "1", "Share ubercharge", - "Aimbot will attempt to share uber charge with un-ubered players"); - int vaccinator_change_stage = 0; int vaccinator_change_ticks = 0; int vaccinator_ideal_resist = 0; int vaccinator_change_timer = 0; -static CatVar auto_vacc_bullets(CV_SWITCH, "auto_vacc_bullets", "1", - "Check bullet danger"); -static CatEnum vacc_sniper_enum({ "NEVER", "ZOOM & VISIBLE", "ANY ZOOMED" }); -static CatVar vacc_sniper(vacc_sniper_enum, "auto_vacc_sniper_pop", "1", - "Pop if Sniper", - "Defines Auto-Vacc behaviour with snipers"); -static CatVar ignore(CV_STRING, "autoheal_ignore", "", "Ignore", - "Ignore people with this name"); - int ChargeCount() { return (CE_FLOAT(LOCAL_W, netvar.m_flChargeLevel) / 0.25f); @@ -78,17 +83,6 @@ int BulletDangerValue(CachedEntity *patient) return any_zoomed_snipers; } -static CatVar auto_vacc_fire_checking(CV_SWITCH, "auto_vacc_fire", "1", - "Check fire danger"); -static CatEnum pyro_enum({ "NEVER", "PRIMARY OUT", "ALWAYS" }); -static CatVar auto_vacc_pop_if_pyro(pyro_enum, "auto_vacc_fire_pop_pyro", "1", - "Pop if pyro is near", - "Defines Auto-Vacc behaviour with pyros"); -static CatVar auto_vacc_check_on_fire(CV_SWITCH, "auto_vacc_afterburn", "1", - "Anti-Afterburn"); -static CatVar auto_vacc_pyro_range(CV_INT, "auto_vacc_pyro_range", "450", - "Pyro Danger Range"); - int FireDangerValue(CachedEntity *patient) { // Find nearby pyros @@ -136,17 +130,6 @@ struct proj_data_s std::vector proj_data_array; -static CatVar auto_vacc_blast_health(CV_INT, "auto_vacc_blast_pop_health", "80", - "Pop Blast if rocket & HP <"); -static CatVar auto_vacc_blast_crit_pop(CV_SWITCH, "auto_vacc_blast_pop_crit", - "1", "Pop Blast if crit rocket near"); -static CatVar auto_vacc_blast_checking(CV_SWITCH, "auto_vacc_blast", "1", - "Check blast danger"); -static CatVar auto_vacc_proj_danger_range(CV_INT, "auto_vacc_rocket_range", - "650", "Rocket Danger Range", - "This range should be high enough to " - "give more time to change " - "resistances."); int BlastDangerValue(CachedEntity *patient) { @@ -210,20 +193,6 @@ int CurrentResistance() return CE_INT(LOCAL_W, netvar.m_nChargeResistType); } -static CatVar change_timer(CV_INT, "auto_vacc_reset_timer", "200", - "Reset Timer", - "If no dangers were detected for # ticks, " - "resistance will be reset to default, 0 to disable"); - -static CatVar auto_vacc_bullet_pop_ubers( - CV_INT, "auto_vacc_bullet_pop_ubers", "0", "Pop Bullet if Ubers >=", - "Only pop an uber if you have >= # Ubercharges in your Vaccinator", 0, 4); -static CatVar auto_vacc_fire_pop_ubers( - CV_INT, "auto_vacc_fire_pop_ubers", "0", "Pop Fire if Ubers >=", - "Only pop an uber if you have >= # Ubercharges in your Vaccinator", 0, 4); -static CatVar auto_vacc_blast_pop_ubers( - CV_INT, "auto_vacc_blast_pop_ubers", "0", "Pop Blast if Ubers >=", - "Only pop an uber if you have >= # Ubercharges in your Vaccinator", 0, 4); bool IsProjectile(CachedEntity *ent) { @@ -284,11 +253,6 @@ int OptimalResistance(CachedEntity *patient, bool *shouldPop) return -1; } -static CatEnum resistances_enum({ "BULLET", "BLAST", "FIRE" }); -static CatVar default_resistance(resistances_enum, "auto_vacc_default_resist", - "0", "Default Resistance", - "Select default resistance type"); - void SetResistance(int resistance) { resistance = _clamp(0, 2, resistance); @@ -428,8 +392,6 @@ bool IsVaccinator() return CE_INT(LOCAL_W, netvar.iItemDefinitionIndex) == 998; } -static CatVar auto_vacc(CV_SWITCH, "auto_vacc", "0", "Auto Vaccinator", - "Pick resistance for incoming damage types"); void CreateMove() {