diff --git a/include/hacks/Announcer.hpp b/include/hacks/Announcer.hpp deleted file mode 100644 index b664178c..00000000 --- a/include/hacks/Announcer.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Announcer.hpp - * - * Created on: Nov 13, 2017 - * Author: nullifiedcat - */ - -#pragma once - -#include "common.hpp" - -namespace hacks::shared::announcer -{ - -void playsound(const std::string &); -void init(); -void shutdown(); -} // namespace hacks::shared::announcer diff --git a/include/hacks/AntiDisguise.hpp b/include/hacks/AntiDisguise.hpp deleted file mode 100755 index 49eec69b..00000000 --- a/include/hacks/AntiDisguise.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * AntiDisguise.h - * - * Created on: Nov 16, 2016 - * Author: nullifiedcat - */ - -#pragma once - -#include "common.hpp" - -namespace hacks::tf2::antidisguise -{ -void Draw(); -} diff --git a/include/hacks/AutoReflect.hpp b/include/hacks/AutoReflect.hpp deleted file mode 100644 index 75ab4b2b..00000000 --- a/include/hacks/AutoReflect.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * AutoReflect.h - * - * Created on: Nov 18, 2016 - * Author: nullifiedcat - */ - -#pragma once - -#include "common.hpp" - -namespace hacks::tf::autoreflect -{ -void Draw(); -void CreateMove(); -bool ShouldReflect(CachedEntity *ent); -bool IsEntStickyBomb(CachedEntity *ent); -} // namespace hacks::tf::autoreflect diff --git a/include/hacks/DominateSay.hpp b/include/hacks/DominateSay.hpp deleted file mode 100644 index a2495abe..00000000 --- a/include/hacks/DominateSay.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * DominateSay.h - * - * Created on: Oct 30, 2017 - */ - -#pragma once - -#include "common.hpp" - -namespace hacks::shared::dominatesay -{ - -void init(); -void shutdown(); -void reload(); - -extern const std::vector builtin_default; -} // namespace hacks::shared::dominatesay diff --git a/include/hacks/KillSay.hpp b/include/hacks/KillSay.hpp deleted file mode 100644 index 064d4143..00000000 --- a/include/hacks/KillSay.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * KillSay.h - * - * Created on: Jan 19, 2017 - * Author: nullifiedcat - */ - -#pragma once - -#include "common.hpp" - -namespace hacks::shared::killsay -{ - -void init(); -void shutdown(); -void reload(); - -extern const std::vector builtin_default; -extern const std::vector builtin_nonecore_offensive; -extern const std::vector builtin_nonecore_mlg; -} // namespace hacks::shared::killsay diff --git a/include/hacks/Killstreak.hpp b/include/hacks/Killstreak.hpp deleted file mode 100644 index dc9f4dad..00000000 --- a/include/hacks/Killstreak.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Killstreak.hpp - * - * Created on: Nov 13, 2017 - * Author: nullifiedcat - */ - -#pragma once - -#include "common.hpp" - -namespace hacks::tf2::killstreak -{ - -int current_streak(); -void init(); -void shutdown(); -void fire_event(IGameEvent *event); -void apply_killstreaks(); -} // namespace hacks::tf2::killstreak diff --git a/include/hacks/Radar.hpp b/include/hacks/Radar.hpp deleted file mode 100644 index dc0a2ff6..00000000 --- a/include/hacks/Radar.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Radar.hpp - * - * Created on: Mar 28, 2017 - * Author: nullifiedcat - */ - -#pragma once -#if ENABLE_VISUALS -#include "visual/atlas.hpp" -#include "common.hpp" - -namespace hacks::tf::radar -{ -std::pair WorldToRadar(int x, int y); -void Draw(); -} // namespace hacks::tf::radar -#endif diff --git a/include/hacks/Spam.hpp b/include/hacks/Spam.hpp index 907bf1c4..f2ba9a0f 100644 --- a/include/hacks/Spam.hpp +++ b/include/hacks/Spam.hpp @@ -6,7 +6,7 @@ */ #pragma once - +#define SPAM_HACK #include "common.hpp" class CatCommand; diff --git a/include/hacks/SpyAlert.hpp b/include/hacks/SpyAlert.hpp deleted file mode 100755 index 8967bd54..00000000 --- a/include/hacks/SpyAlert.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SpyAlert.h - * - * Created on: Dec 5, 2016 - * Author: nullifiedcat - */ - -#pragma once - -#include "common.hpp" - -namespace hacks::tf::spyalert -{ -void Draw(); -} diff --git a/include/hacks/hacklist.hpp b/include/hacks/hacklist.hpp index ac3a6d2e..4afa6519 100755 --- a/include/hacks/hacklist.hpp +++ b/include/hacks/hacklist.hpp @@ -13,22 +13,13 @@ #include "ESP.hpp" #include "SkinChanger.hpp" -#include "Radar.hpp" -#include "SpyAlert.hpp" #endif #include "Aimbot.hpp" #include "AntiAim.hpp" -#include "AntiDisguise.hpp" #include "AutoHeal.hpp" -#include "AutoReflect.hpp" -#include "AutoSticky.hpp" -#include "AutoDetonator.hpp" #include "AntiCheat.hpp" #include "SeedPrediction.hpp" -#if ENABLE_VISUALS -#include "Radar.hpp" -#endif #include "Walkbot.hpp" #include "navparser.hpp" #include "AutoJoin.hpp" @@ -37,14 +28,10 @@ #include "FollowBot.hpp" #include "Misc.hpp" #include "Trigger.hpp" -#include "KillSay.hpp" -#include "DominateSay.hpp" #include "UberSpam.hpp" #include "Achievement.hpp" #include "Spam.hpp" #include "NavBot.hpp" #include "FollowBot.hpp" -#include "Announcer.hpp" -#include "Killstreak.hpp" #include "CatBot.hpp" #include "Backtrack.hpp" diff --git a/include/hooks/HookTools.hpp b/include/hooks/HookTools.hpp index 13796ec7..64158e6f 100644 --- a/include/hooks/HookTools.hpp +++ b/include/hooks/HookTools.hpp @@ -14,7 +14,12 @@ enum ec_types : int8_t Draw, #endif Paint, - LevelInit + LevelInit, + /* TO DO: Should we permanently store Init events ? They are used only once */ + Init, + Shutdown, + /* Append new event above this line. Line below declares amount of events */ + EcTypesSize }; enum priority : int8_t diff --git a/src/chatlog.cpp b/src/chatlog.cpp index 9d7ce484..41ad8514 100644 --- a/src/chatlog.cpp +++ b/src/chatlog.cpp @@ -14,7 +14,9 @@ #include static settings::Bool enable{ "chat-log.enable", "false" }; +#ifdef SPAM_HACK static settings::Bool no_spam{ "chat-log.no-spam", "true" }; +#endif static settings::Bool no_ipc{ "chat-log.no-ipc", "true" }; namespace chatlog @@ -108,8 +110,10 @@ void LogMessage(int eid, std::string message) { return; } +#ifdef SPAM_HACK if (no_spam && hacks::shared::spam::isActive() and eid == g_IEngine->GetLocalPlayer()) return; +#endif player_info_s info{}; if (not g_IEngine->GetPlayerInfo(eid, &info)) return; diff --git a/src/hack.cpp b/src/hack.cpp index f2314e83..6927e980 100644 --- a/src/hack.cpp +++ b/src/hack.cpp @@ -292,11 +292,7 @@ free(logname);*/ } #endif // FIXME [MP] - hacks::shared::killsay::init(); - hacks::shared::dominatesay::init(); - hacks::shared::announcer::init(); - hacks::tf2::killstreak::init(); - hacks::shared::catbot::init(); + EC::run(EC::Init); logging::Info("Hooked!"); velocity::Init(); playerlist::Load(); @@ -324,9 +320,7 @@ free(logname);*/ InitSpinner(); logging::Info("Initialized Fidget Spinner"); #endif - hacks::shared::spam::init(); #endif - hacks::shared::walkbot::Initialize(); #if ENABLE_VISUALS hacks::shared::esp::Init(); #endif @@ -380,9 +374,7 @@ void hack::Shutdown() logging::Info("Shutting down killsay..."); if (!hack::game_shutdown) { - hacks::shared::killsay::shutdown(); - hacks::shared::dominatesay::shutdown(); - hacks::shared::announcer::shutdown(); + EC::run(EC::Shutdown); #if ENABLE_VISUALS g_pScreenSpaceEffects->DisableScreenSpaceEffect("_cathook_glow"); g_pScreenSpaceEffects->DisableScreenSpaceEffect("_cathook_chams"); diff --git a/src/hacks/Announcer.cpp b/src/hacks/Announcer.cpp index 7b7c1250..ed2895b9 100644 --- a/src/hacks/Announcer.cpp +++ b/src/hacks/Announcer.cpp @@ -160,4 +160,9 @@ void shutdown() { g_IEventManager2->RemoveListener(&listener()); } + +static InitRoutine EC([]() { + EC::Register(EC::Init, init, "init_announcer", EC::average); + EC::Register(EC::Shutdown, shutdown, "shutdown_announcer", EC::average); +}); } // namespace hacks::shared::announcer diff --git a/src/hacks/AntiDisguise.cpp b/src/hacks/AntiDisguise.cpp index 713d6f2f..2bbf58a4 100644 --- a/src/hacks/AntiDisguise.cpp +++ b/src/hacks/AntiDisguise.cpp @@ -48,4 +48,8 @@ void Draw() } } } + +static InitRoutine EC([]() { + EC::Register(EC::Draw, Draw, "antidisguise", EC::average); +}); } // namespace hacks::tf2::antidisguise diff --git a/src/hacks/AutoReflect.cpp b/src/hacks/AutoReflect.cpp index 890afcb4..b6fd2ece 100644 --- a/src/hacks/AutoReflect.cpp +++ b/src/hacks/AutoReflect.cpp @@ -6,7 +6,6 @@ */ #include "common.hpp" -#include #if ENABLE_VISUALS #include #endif @@ -29,6 +28,55 @@ static settings::Float fovcircle_opacity{ "autoreflect.draw-fov-opacity", "0.7" namespace hacks::tf::autoreflect { +bool IsEntStickyBomb(CachedEntity *ent) +{ + // Check if the projectile is a sticky bomb + if (ent->m_iClassID() == CL_CLASS(CTFGrenadePipebombProjectile)) + { + if (CE_INT(ent, netvar.iPipeType) == 1) + { + // Ent passed and should be reflected + return true; + } + } + // Ent didnt pass the test so return false + return false; +} + +// Function to determine whether an ent is good to reflect +bool ShouldReflect(CachedEntity *ent) +{ + // Check if the entity is a projectile + if (ent->m_Type() != ENTITY_PROJECTILE) + return false; + + if (!teammates) + { + // Check if the projectile is your own teams + if (!ent->m_bEnemy()) + return false; + } + + // We dont want to do these checks in dodgeball, it breakes if we do + if (!dodgeball) + { + // If projectile is already deflected, don't deflect it again. + if (CE_INT(ent, (ent->m_bGrenadeProjectile() ? + /* NetVar for grenades */ netvar.Grenade_iDeflected + : + /* For rockets */ netvar.Rocket_iDeflected))) + return false; + } + + // Check if the projectile is a sticky bomb and if the user settings allow + // it to be reflected + if (IsEntStickyBomb(ent) && !stickies) + return false; + + // Target passed the test, return true + return true; +} + // Function called by game for movement void CreateMove() { @@ -129,54 +177,6 @@ void CreateMove() current_user_cmd->buttons |= IN_ATTACK2; } -// Function to determine whether an ent is good to reflect -bool ShouldReflect(CachedEntity *ent) -{ - // Check if the entity is a projectile - if (ent->m_Type() != ENTITY_PROJECTILE) - return false; - - if (!teammates) - { - // Check if the projectile is your own teams - if (!ent->m_bEnemy()) - return false; - } - - // We dont want to do these checks in dodgeball, it breakes if we do - if (!dodgeball) - { - // If projectile is already deflected, don't deflect it again. - if (CE_INT(ent, (ent->m_bGrenadeProjectile() ? - /* NetVar for grenades */ netvar.Grenade_iDeflected - : - /* For rockets */ netvar.Rocket_iDeflected))) - return false; - } - - // Check if the projectile is a sticky bomb and if the user settings allow - // it to be reflected - if (IsEntStickyBomb(ent) && !stickies) - return false; - - // Target passed the test, return true - return true; -} - -bool IsEntStickyBomb(CachedEntity *ent) -{ - // Check if the projectile is a sticky bomb - if (ent->m_iClassID() == CL_CLASS(CTFGrenadePipebombProjectile)) - { - if (CE_INT(ent, netvar.iPipeType) == 1) - { - // Ent passed and should be reflected - return true; - } - } - // Ent didnt pass the test so return false - return false; -} void Draw() { #if ENABLE_VISUALS @@ -213,4 +213,11 @@ void Draw() } #endif } + +static InitRoutine EC([]() { + EC::Register(EC::CreateMove, CreateMove, "auto_reflect", EC::average); +#if ENABLE_VISUALS + EC::Register(EC::Draw, Draw, "auto_reflect", EC::average); +#endif +}); } // namespace hacks::tf::autoreflect diff --git a/src/hacks/CatBot.cpp b/src/hacks/CatBot.cpp index 8b640373..f0049e0e 100644 --- a/src/hacks/CatBot.cpp +++ b/src/hacks/CatBot.cpp @@ -446,7 +446,8 @@ static void draw() #endif static InitRoutine runinit([]() { - EC::Register(cm, "cm_catbot", EC::average); + EC::Register(EC::CreateMove, cm, "cm_catbot", EC::average); + EC::Register(EC::Init, init, "init_catbot", EC::average); #if ENABLE_VISUALS EC::Register(draw, "draw_catbot", EC::average); #endif diff --git a/src/hacks/DominateSay.cpp b/src/hacks/DominateSay.cpp index 8a1d66a1..4c089b3e 100644 --- a/src/hacks/DominateSay.cpp +++ b/src/hacks/DominateSay.cpp @@ -4,20 +4,21 @@ * Created on: October 30, 2018 */ -#include #include #include "common.hpp" static settings::Int dominatesay_mode{ "dominatesay.mode", "0" }; static settings::String filename{ "dominatesay.file", "dominatesay.txt" }; -static CatCommand reload_command("dominatesay_reload", "Reload dominatesays", []() { hacks::shared::dominatesay::reload(); }); - namespace hacks::shared::dominatesay { - +// a much better default dominatesay would be appreciated. +const std::vector builtin_default = { + "dominating %name%! (%dominum% dominations)", + "%name%, getting tapped?", + "%killer% is dominating the server with %dominum% dominations!", +}; const std::string tf_classes_dominatesay[] = { "class", "scout", "sniper", "soldier", "demoman", "medic", "heavy", "pyro", "spy", "engineer" }; - const std::string tf_teams_dominatesay[] = { "RED", "BLU" }; static std::string lastmsg{}; @@ -105,11 +106,11 @@ void shutdown() g_IEventManager2->RemoveListener(&listener); } -// a much better default dominatesay would be appreciated. -const std::vector builtin_default = { - "dominating %name%! (%dominum% dominations)", - "%name%, getting tapped?", - "%killer% is dominating the server with %dominum% dominations!", -}; +static CatCommand reload_command("dominatesay_reload", "Reload dominatesays", []() { reload(); }); + +static InitRoutine EC([]() { + EC::Register(EC::Init, init, "init_dominatesay", EC::average); + EC::Register(EC::Shutdown, shutdown, "shutdown_dominatesay", EC::average); +}); } // namespace hacks::shared::dominatesay diff --git a/src/hacks/KillSay.cpp b/src/hacks/KillSay.cpp index c1287020..76ee859f 100644 --- a/src/hacks/KillSay.cpp +++ b/src/hacks/KillSay.cpp @@ -5,7 +5,6 @@ * Author: nullifiedcat */ -#include #include #include "common.hpp" @@ -22,15 +21,51 @@ struct KillsayStorage static std::unordered_map killsay_storage{}; -static CatCommand reload_command("killsay_reload", "Reload killsays", []() { hacks::shared::killsay::reload(); }); - namespace hacks::shared::killsay { +// Thanks HellJustFroze for linking me http://daviseford.com/shittalk/ +const std::vector builtin_default = { "Don't worry guys, I'm a garbage collector. I'm used to carrying trash.", + "%name% is the human equivalent of a participation award.", + "I would insult %name%, but nature did a better job.", + "%name%, perhaps your strategy should include trying.", + "Some people get paid to suck, you do it for free, %name%.", + "%name%, I'd tell you to commit suicide, but then you'd have a kill.", + "You must really like that respawn timer, %name%.", + + "If your main is %class%, you should give up.", + "Hey %name%, i see you can't play %class%. Try quitting the game.", + "%team% is filled with spergs", + "%name%@gmail.com to vacreview@valvesoftware.com\nFOUND CHEATER", + "\n☐ Not rekt\n ☑ Rekt\n ☑ Really Rekt\n ☑ Tyrannosaurus Rekt" }; + +const std::vector builtin_nonecore_offensive = { "%name%, you are noob.", + "%name%, do you even lift?", + "%name%, you're a faggot.", + "%name%, stop cheating.", + "%name%: Mom, call the police - I've got headshoted again!", + "Right into your face, %name%.", + "Into your face, pal.", + "Keep crying, baby.", + "Faggot. Noob.", + "You are dead, not big surprise.", + "Sit down nerd.", + "Fuck you with a rake.", + "Eat a man spear, you Jamaican manure salesman.", + "Wallow in a river of cocks, you pathetic bitch.", + "I will go to heaven and you will be in prison.", + "Piss off, you poor, ignorant, mullet-wearing porch monkey.", + "Your Mom says your turn-ons consist of butthole licking and scat porn.", + "Shut up, you'll never be the man your mother is.", + "It looks like your face caught on fire and someone tried to put it out " + "with a fork.", + "You're so ugly Hello Kitty said goodbye to you.", + "Don't you love nature, despite what it did to you?" + +}; +const std::vector builtin_nonecore_mlg = { "GET REKT U SCRUB", "GET REKT M8", "U GOT NOSCOPED M8", "U GOT QUICKSCOPED M8", "2 FAST 4 U, SCRUB", "U GOT REKT, M8" }; const std::string tf_classes_killsay[] = { "class", "scout", "sniper", "soldier", "demoman", "medic", "heavy", "pyro", "spy", "engineer" }; - const std::string tf_teams_killsay[] = { "RED", "BLU" }; - static std::string lastmsg{}; TextFile file{}; @@ -121,8 +156,6 @@ static void ProcessKillsay() } } -static InitRoutine runinit([]() { EC::Register(ProcessKillsay, "paint_killsay", EC::average); }); - static KillSayEventListener listener{}; void reload() @@ -130,6 +163,8 @@ void reload() file.Load(*filename); } +static CatCommand reload_command("killsay_reload", "Reload killsays", []() { reload(); }); + void init() { g_IEventManager2->AddListener(&listener, (const char *) "player_death", false); @@ -140,44 +175,10 @@ void shutdown() g_IEventManager2->RemoveListener(&listener); } -// Thanks HellJustFroze for linking me http://daviseford.com/shittalk/ -const std::vector builtin_default = { "Don't worry guys, I'm a garbage collector. I'm used to carrying trash.", - "%name% is the human equivalent of a participation award.", - "I would insult %name%, but nature did a better job.", - "%name%, perhaps your strategy should include trying.", - "Some people get paid to suck, you do it for free, %name%.", - "%name%, I'd tell you to commit suicide, but then you'd have a kill.", - "You must really like that respawn timer, %name%.", +static InitRoutine runinit([]() { + EC::Register(EC::Paint, ProcessKillsay, "paint_killsay", EC::average); + EC::Register(EC::Init, init, "init_killsay", EC::average); + EC::Register(EC::Shutdown, shutdown, "shutdown_killsay", EC::average); +}); - "If your main is %class%, you should give up.", - "Hey %name%, i see you can't play %class%. Try quitting the game.", - "%team% is filled with spergs", - "%name%@gmail.com to vacreview@valvesoftware.com\nFOUND CHEATER", - "\n☐ Not rekt\n ☑ Rekt\n ☑ Really Rekt\n ☑ Tyrannosaurus Rekt" }; - -const std::vector builtin_nonecore_offensive = { "%name%, you are noob.", - "%name%, do you even lift?", - "%name%, you're a faggot.", - "%name%, stop cheating.", - "%name%: Mom, call the police - I've got headshoted again!", - "Right into your face, %name%.", - "Into your face, pal.", - "Keep crying, baby.", - "Faggot. Noob.", - "You are dead, not big surprise.", - "Sit down nerd.", - "Fuck you with a rake.", - "Eat a man spear, you Jamaican manure salesman.", - "Wallow in a river of cocks, you pathetic bitch.", - "I will go to heaven and you will be in prison.", - "Piss off, you poor, ignorant, mullet-wearing porch monkey.", - "Your Mom says your turn-ons consist of butthole licking and scat porn.", - "Shut up, you'll never be the man your mother is.", - "It looks like your face caught on fire and someone tried to put it out " - "with a fork.", - "You're so ugly Hello Kitty said goodbye to you.", - "Don't you love nature, despite what it did to you?" - -}; -const std::vector builtin_nonecore_mlg = { "GET REKT U SCRUB", "GET REKT M8", "U GOT NOSCOPED M8", "U GOT QUICKSCOPED M8", "2 FAST 4 U, SCRUB", "U GOT REKT, M8" }; } // namespace hacks::shared::killsay diff --git a/src/hacks/Killstreak.cpp b/src/hacks/Killstreak.cpp index 1962807e..29aaa401 100644 --- a/src/hacks/Killstreak.cpp +++ b/src/hacks/Killstreak.cpp @@ -126,4 +126,8 @@ bool FireEventClientSide(IGameEventManager2 *manager, IGameEvent *event) void init() { } + +static InitRoutine EC([]() { + EC::Register(EC::Paint, apply_killstreaks, "killstreak", EC::average); +}); } // namespace hacks::tf2::killstreak diff --git a/src/hacks/Radar.cpp b/src/hacks/Radar.cpp index c8290873..4cae9f13 100644 --- a/src/hacks/Radar.cpp +++ b/src/hacks/Radar.cpp @@ -9,7 +9,6 @@ #include #endif #include -#include "hacks/Radar.hpp" #ifndef FEATURE_RADAR_DISABLED #if ENABLE_VISUALS @@ -73,23 +72,6 @@ static std::vector> tx_class{}; static std::vector tx_teams{}; static std::vector tx_items{}; -InitRoutine init([]() { - // Background circles - for (int i = 0; i < 2; ++i) - tx_teams.push_back(textures::atlas().create_sprite(704, 384 + i * 64, 64, 64)); - // Items - for (int i = 0; i < 2; ++i) - tx_items.push_back(textures::atlas().create_sprite(640, 384 + i * 64, 64, 64)); - // Classes - for (int i = 0; i < 3; ++i) - { - tx_class.emplace_back(); - for (int j = 0; j < 9; ++j) - tx_class[i].push_back(textures::atlas().create_sprite(j * 64, 320 + i * 64, 64, 64)); - } - logging::Info("Radar sprites loaded"); -}); - void DrawEntity(int x, int y, CachedEntity *ent) { int idx = -1; @@ -231,6 +213,25 @@ void Draw() glez::draw::line(x + half_size, y + half_size / 2, 0, half_size, colors::Transparent(GUIColor(), 0.4f), 0.5f); glez::draw::line(x + half_size / 2, y + half_size, half_size, 0, colors::Transparent(GUIColor(), 0.4f), 0.5f); } + + +InitRoutine init([]() { + // Background circles + for (int i = 0; i < 2; ++i) + tx_teams.push_back(textures::atlas().create_sprite(704, 384 + i * 64, 64, 64)); + // Items + for (int i = 0; i < 2; ++i) + tx_items.push_back(textures::atlas().create_sprite(640, 384 + i * 64, 64, 64)); + // Classes + for (int i = 0; i < 3; ++i) + { + tx_class.emplace_back(); + for (int j = 0; j < 9; ++j) + tx_class[i].push_back(textures::atlas().create_sprite(j * 64, 320 + i * 64, 64, 64)); + } + logging::Info("Radar sprites loaded"); + EC::Register(EC::Draw, Draw, "radar", EC::average); +}); } // namespace hacks::tf::radar #endif diff --git a/src/hacks/Spam.cpp b/src/hacks/Spam.cpp index e2348ac1..d57d506c 100644 --- a/src/hacks/Spam.cpp +++ b/src/hacks/Spam.cpp @@ -383,6 +383,11 @@ const std::vector builtin_blanks = { ". \n\n\n\n\n\n\n\n\n\n\n\ const std::vector builtin_nonecore = { "NULL CORE - REDUCE YOUR RISK OF BEING OWNED!", "NULL CORE - WAY TO THE TOP!", "NULL CORE - BEST TF2 CHEAT!", "NULL CORE - NOW WITH BLACKJACK AND HOOKERS!", "NULL CORE - BUTTHURT IN 10 SECONDS FLAT!", "NULL CORE - WHOLE SERVER OBSERVING!", "NULL CORE - GET BACK TO PWNING!", "NULL CORE - WHEN PVP IS TOO HARDCORE!", "NULL CORE - CAN CAUSE KIDS TO RAGE!", "NULL CORE - F2P NOOBS WILL BE 100% NERFED!" }; const std::vector builtin_lmaobox = { "GET GOOD, GET LMAOBOX!", "LMAOBOX - WAY TO THE TOP", "WWW.LMAOBOX.NET - BEST FREE TF2 HACK!" }; const std::vector builtin_lithium = { "CHECK OUT www.YouTube.com/c/DurRud FOR MORE INFORMATION!", "PWNING AIMBOTS WITH OP ANTI-AIMS SINCE 2015 - LITHIUMCHEAT", "STOP GETTING MAD AND STABILIZE YOUR MOOD WITH LITHIUMCHEAT!", "SAVE YOUR MONEY AND GET LITHIUMCHEAT! IT IS FREE!", "GOT ROLLED BY LITHIUM? HEY, THAT MEANS IT'S TIME TO GET LITHIUMCHEAT!!" }; + +static InitRoutine EC([]() { + EC::Register(EC::CreateMove, createMove, "spam", EC::average); + init(); +}); } // namespace hacks::shared::spam static CatCommand reload("spam_reload", "Reload spam file", hacks::shared::spam::reloadSpamFile); diff --git a/src/hacks/SpyAlert.cpp b/src/hacks/SpyAlert.cpp index 1e98007b..1a9b1418 100644 --- a/src/hacks/SpyAlert.cpp +++ b/src/hacks/SpyAlert.cpp @@ -103,4 +103,8 @@ void Draw() backstab_triggered = false; } } + +static InitRoutine EC([]() { + EC::Register(EC::Draw, Draw, "spyalert", EC::average); +}); } // namespace hacks::tf::spyalert diff --git a/src/hacks/Trigger.cpp b/src/hacks/Trigger.cpp index e8171bf7..3ab79c4c 100644 --- a/src/hacks/Trigger.cpp +++ b/src/hacks/Trigger.cpp @@ -626,4 +626,8 @@ bool CheckLineBox(Vector B1, Vector B2, Vector L1, Vector L2, Vector &Hit) void Draw() { } + +static InitRoutine EC([]() { + EC::Register(EC::CreateMove, CreateMove, "triggerbot", EC::average); +}); } // namespace hacks::shared::triggerbot diff --git a/src/hooks/CreateMove.cpp b/src/hooks/CreateMove.cpp index 372084d7..58ffb761 100644 --- a/src/hooks/CreateMove.cpp +++ b/src/hooks/CreateMove.cpp @@ -310,25 +310,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs hacks::shared::antiaim::ProcessUserCmd(cmd); } IF_GAME(IsTF()) - { - PROF_SECTION(CM_autosticky); - hacks::tf::autosticky::CreateMove(); - } - IF_GAME(IsTF()) - { - PROF_SECTION(CM_autodetonator); - hacks::tf::autodetonator::CreateMove(); - } - IF_GAME(IsTF()) - { - PROF_SECTION(CM_autoreflect); - hacks::tf::autoreflect::CreateMove(); - } - { - PROF_SECTION(CM_triggerbot); - hacks::shared::triggerbot::CreateMove(); - } - IF_GAME(IsTF()) { PROF_SECTION(CM_autoheal); hacks::tf::autoheal::CreateMove(); @@ -351,14 +332,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs PROF_SECTION(CM_misc); hacks::shared::misc::CreateMove(); } - { - PROF_SECTION(CM_crits); - criticals::create_move(); - } - { - PROF_SECTION(CM_spam); - hacks::shared::spam::createMove(); - } { PROF_SECTION(CM_AC); hacks::shared::anticheat::CreateMove(); diff --git a/src/hooks/Paint.cpp b/src/hooks/Paint.cpp index 5bc18ee1..a7503b2b 100644 --- a/src/hooks/Paint.cpp +++ b/src/hooks/Paint.cpp @@ -29,7 +29,6 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode) if (mode & PaintMode_t::PAINT_UIPANELS) { - hacks::tf2::killstreak::apply_killstreaks(); hacks::shared::catbot::update(); hitrate::Update(); #if ENABLE_ONLINE diff --git a/src/hooks/visual/PaintTraverse.cpp b/src/hooks/visual/PaintTraverse.cpp index 3bca4b87..1335775d 100644 --- a/src/hooks/visual/PaintTraverse.cpp +++ b/src/hooks/visual/PaintTraverse.cpp @@ -6,7 +6,6 @@ #include #include #include "HookedMethods.hpp" -#include "hacks/Radar.hpp" #include "CatBot.hpp" static settings::Bool pure_bypass{ "visual.sv-pure-bypass", "false" }; diff --git a/src/visual/drawmgr.cpp b/src/visual/drawmgr.cpp index c92fcc2a..06866ccf 100644 --- a/src/visual/drawmgr.cpp +++ b/src/visual/drawmgr.cpp @@ -192,36 +192,10 @@ void DrawCheatVisuals() PROF_SECTION(DRAW_skinchanger); hacks::tf2::skinchanger::DrawText(); } -#ifndef FEATURE_RADAR_DISABLED - IF_GAME(IsTF()) - { - PROF_SECTION(DRAW_radar); - hacks::tf::radar::Draw(); - } -#endif - IF_GAME(IsTF()) - { - PROF_SECTION(DRAW_autoreflect); - hacks::tf::autoreflect::Draw(); - } { PROF_SECTION(DRAW_walkbot); hacks::shared::walkbot::Draw(); } - IF_GAME(IsTF()) - { - PROF_SECTION(PT_antidisguise); - hacks::tf2::antidisguise::Draw(); - } - IF_GAME(IsTF()) - { - PROF_SECTION(PT_spyalert); - hacks::tf::spyalert::Draw(); - } - IF_GAME(IsTF2()) - { - criticals::draw(); - } #ifndef FEATURE_FIDGET_SPINNER_ENABLED DrawSpinner(); #endif