Merge pull request #513 from nullworks/master

gcc-7 updates
This commit is contained in:
nullifiedcat 2018-06-24 17:44:22 +03:00 committed by GitHub
commit dbe4c2942e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 174 additions and 514 deletions

35
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,35 @@
# NullWorks code style (Work in progress)
## C/C++
### General
- Code must be formatted with `clang-format`, the `.clang-format` settings file is provided within this repo.
- `using namespace` is strictly forbidden.
- [Hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation) is forbidden.
### File names
`PascalCase`.
### Header files
Header files must have extension of `.hpp` and be guarded with `#pragma once` in the beginning.
### Variable names
- Variable names must be `lower_snake_case`, member variable names **must not** be prefixed by `m_` or any other prefixes.
- Constants must be in `UPPER_SNAKE_CASE` and use `constexpr`, not `#define`. For example: `constexpr int MAX = 100;`.
### Namespace names
Namespace names follow the same rules as *Variable names*.
### Function names
Function/method names must be in `lowerCamelCase`.
### Class names
- Class names must be in `PascalCase`.
- Struct names must be in `lower_snake_case`.

View File

@ -66,11 +66,11 @@ Make sure to put the required files in ../requirements/lib*, and cathook in ../c
### Outdated (but might be helpful):
You can use gcc-7 for compiling cathook if you add `-e CC=gcc-7 CXX=g++-7` to make command line
You need to use gcc-7 for compiling cathook if you add `-e CC=gcc-7 CXX=g++-7` to make command line
Ubuntu gcc6 installation: (check if you have gcc-6 installed already by typing `gcc-6 -v`
Ubuntu gcc7 installation: (check if you have gcc-6 installed already by typing `gcc-6 -v`
```bash
sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot g++-6-multilib gcc-6 g++-6 -y
sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot g++-7-multilib gcc-7 g++-7 -y
```
Ubuntu other dependencies installation:
@ -79,6 +79,7 @@ Ubuntu other dependencies installation:
sudo apt update && sudo apt install git libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libfreetype6-dev:i386 -y
```
### Even more Outdated (but might still be helpful):
Arch gcc6 & dependencies installation:
```bash
@ -111,7 +112,7 @@ git clone --recursive https://github.com/nullworks/cathook && cd cathook && bash
**Errors while installing?**
`/usr/include/c++/5/string:38:28: fatal error: bits/c++config.h: No such file or directory`
`/usr/include/c++/7/string:38:28: fatal error: bits/c++config.h: No such file or directory`
You don't have gcc-7-multilib installed correctly.
Anything related to `glez` or `xoverlay`

View File

@ -20,7 +20,6 @@ extern CatVar joinclass;
extern CatVar jointeam;
extern CatVar fakelag_amount;
extern CatVar serverlag_amount;
extern CatVar serverlag_string;
extern CatVar servercrash;
extern CatVar debug_projectiles;
extern CatVar semiauto;

View File

@ -41,16 +41,10 @@ public:
int max_value;
int size;
};
namespace hacks
{
namespace tf2
{
namespace global
namespace hacks::tf2::global
{
void runcfg();
}
}
}
// TODO reverse, no idea how catcommands are handled
class CatCommand
{

View File

@ -9,11 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace autoheal
namespace hacks::tf::autoheal
{
// TODO extern CatVar target_only;
void CreateMove();
@ -35,5 +31,3 @@ int BestTarget();
int HealingPriority(int idx);
bool CanHeal(int idx);
}
}
}

View File

@ -7,11 +7,7 @@
#pragma once
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace autojoin
namespace hacks::shared::autojoin
{
extern CatVar auto_queue;
@ -20,5 +16,3 @@ extern Timer queuetime;
void Update();
void UpdateSearch();
}
}
}

View File

@ -9,16 +9,10 @@
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace autoreflect
namespace hacks::tf::autoreflect
{
void Draw();
void CreateMove();
bool ShouldReflect(CachedEntity *ent);
bool IsEntStickyBomb(CachedEntity *ent);
}
}
}

View File

@ -9,14 +9,8 @@
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace autosticky
namespace hacks::tf::autosticky
{
bool ShouldDetonate(CachedEntity *bomb);
void CreateMove();
}
}
}

View File

@ -10,13 +10,7 @@
class CatVar;
class InitRoutine;
namespace hacks
{
namespace tf
{
namespace autotaunt
namespace hacks::tf::autotaunt
{
extern InitRoutine init;
}
}
}

View File

@ -9,11 +9,7 @@
#include "common.hpp"
#include <boost/circular_buffer.hpp>
namespace hacks
{
namespace shared
{
namespace backtrack
namespace hacks::shared::backtrack
{
struct BacktrackData
{
@ -61,5 +57,3 @@ extern CatVar enable;
extern BacktrackData headPositions[32][66];
extern BestTickData sorted_ticks[66];
}
}
}

View File

@ -9,13 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace bunnyhop
namespace hacks::shared::bunnyhop
{
void CreateMove();
}
}
}

View File

@ -9,11 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace catbot
namespace hacks::shared::catbot
{
bool is_a_catbot(unsigned steamID);
@ -26,5 +22,3 @@ void level_init();
void update_ipc_data(ipc::user_data_s &data);
#endif
}
}
}

View File

@ -9,11 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace esp
namespace hacks::shared::esp
{
// Strings
@ -63,5 +59,3 @@ void AddEntityString(CachedEntity *entity, const std::string &string,
void SetEntityColor(CachedEntity *entity, const rgba_t &color);
void ResetEntityStrings();
}
}
}

View File

@ -7,11 +7,7 @@
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace followbot
namespace hacks::shared::followbot
{
// Followed entity, externed for highlight color
@ -24,5 +20,3 @@ extern unsigned steamid;
void DrawTick();
void WorldTick();
}
}
}

View File

@ -7,16 +7,10 @@
#pragma once
namespace hacks
{
namespace tf2
{
namespace healarrow
namespace hacks::tf2::healarrow
{
void CreateMove();
void Draw();
void Init();
}
}
}

View File

@ -16,11 +16,7 @@ class KillSayEventListener : public IGameEventListener2
virtual void FireGameEvent(IGameEvent *event);
};
namespace hacks
{
namespace shared
{
namespace killsay
namespace hacks::shared::killsay
{
void Init();
@ -32,5 +28,3 @@ extern const std::vector<std::string> builtin_default;
extern const std::vector<std::string> builtin_nonecore_offensive;
extern const std::vector<std::string> builtin_nonecore_mlg;
}
}
}

View File

@ -9,11 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf2
{
namespace killstreak
namespace hacks::tf2::killstreak
{
int current_streak();
@ -22,5 +18,3 @@ void shutdown();
void fire_event(IGameEvent *event);
void apply_killstreaks();
}
}
}

View File

@ -11,11 +11,7 @@
// Idea from UC (instant bomb defuse thread)
namespace hacks
{
namespace shared
{
namespace lagexploit
namespace hacks::shared::lagexploit
{
extern const model_t *pointarr[5];
extern bool bcalled;
@ -24,5 +20,3 @@ void Draw();
void AddExploitTicks(int ticks);
bool ExploitActive();
}
}
}

View File

@ -1,14 +1,8 @@
#include "common.hpp"
#include <hacks/Aimbot.hpp>
namespace hacks
{
namespace shared
{
namespace lightesp
namespace hacks::shared::lightesp
{
void run();
void draw();
rgba_t LightESPColor(CachedEntity *ent);
}
}
}

View File

@ -10,11 +10,7 @@
#include "common.hpp"
#include "config.h"
namespace hacks
{
namespace shared
{
namespace misc
namespace hacks::shared::misc
{
void CreateMove();
@ -26,8 +22,6 @@ extern int last_number;
extern float last_bucket;
}
}
}
/*class Misc : public IHack {
public:

View File

@ -9,13 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf2
{
namespace noisemaker
namespace hacks::tf2::noisemaker
{
void CreateMove();
}
}
}

View File

@ -10,15 +10,9 @@
#include "visual/atlas.hpp"
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace radar
namespace hacks::tf::radar
{
std::pair<int, int> WorldToRadar(int x, int y);
void Draw();
}
}
}
#endif

View File

@ -9,11 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf2
{
namespace skinchanger
namespace hacks::tf2::skinchanger
{
class CAttributeList;
@ -142,5 +138,3 @@ void InvalidateCookie();
void FrameStageNotify(int stage);
void DrawText();
}
}
}

View File

@ -11,11 +11,7 @@
class CatCommand;
namespace hacks
{
namespace shared
{
namespace spam
namespace hacks::shared::spam
{
extern const std::vector<std::string> builtin_default;
@ -31,5 +27,3 @@ void Init();
void CreateMove();
void Reload();
}
}
}

View File

@ -9,13 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace spyalert
namespace hacks::tf::spyalert
{
void Draw();
}
}
}

View File

@ -11,11 +11,7 @@
class CatVar;
namespace hacks
{
namespace shared
{
namespace triggerbot
namespace hacks::shared::triggerbot
{
void CreateMove();
@ -28,5 +24,3 @@ float EffectiveTargetingRange();
void Draw();
bool CheckLineBox(Vector B1, Vector B2, Vector L1, Vector L2, Vector &Hit);
}
}
}

View File

@ -9,11 +9,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace uberspam
namespace hacks::tf::uberspam
{
void CreateMove();
@ -23,5 +19,3 @@ void CreateMove();
extern const std::vector<std::string> builtin_cathook;
extern const std::vector<std::string> builtin_nonecore;
}
}
}

View File

@ -9,11 +9,7 @@
#include "config.h"
namespace hacks
{
namespace shared
{
namespace walkbot
namespace hacks::shared::walkbot
{
void Initialize();
@ -23,5 +19,3 @@ void Draw();
void Move();
void OnLevelInit();
}
}
}

View File

@ -12,9 +12,7 @@
class KeyValues;
class CachedEntity;
namespace ac
{
namespace aimbot
namespace ac::aimbot
{
struct ac_data
@ -32,4 +30,3 @@ void Init();
void Update(CachedEntity *player);
void Event(KeyValues *event);
}
}

View File

@ -10,9 +10,7 @@
class KeyValues;
class CachedEntity;
namespace ac
{
namespace antiaim
namespace ac::antiaim
{
extern int amount[32];
@ -23,4 +21,3 @@ void Init();
void Update(CachedEntity *player);
void Event(KeyValues *event);
}
}

View File

@ -10,9 +10,7 @@
class KeyValues;
class CachedEntity;
namespace ac
{
namespace bhop
namespace ac::bhop
{
struct ac_data
@ -30,4 +28,3 @@ void Init();
void Update(CachedEntity *player);
void Event(KeyValues *event);
}
}

View File

@ -9,9 +9,7 @@
#include "../CBaseWidget.h"
namespace menu
{
namespace ncc
namespace menu::ncc
{
class Item : public CBaseWidget
@ -29,4 +27,3 @@ public:
virtual void HandleCustomEvent(KeyValues *event) override;
};
}
}

View File

@ -12,9 +12,7 @@
class CatVar;
namespace menu
{
namespace ncc
namespace menu::ncc
{
class List; // ????
@ -37,4 +35,3 @@ public:
const std::string title;
};
}
}

View File

@ -9,9 +9,7 @@
#include "menu/ncc/Item.hpp"
namespace menu
{
namespace ncc
namespace menu::ncc
{
class ItemTitle : public Item
@ -25,4 +23,3 @@ public:
const std::string title;
};
}
}

View File

@ -11,9 +11,7 @@
class CatVar;
namespace menu
{
namespace ncc
namespace menu::ncc
{
class ItemVariable : public Item
@ -36,4 +34,3 @@ public:
bool capturing{ false };
};
}
}

View File

@ -12,9 +12,7 @@
class Item;
namespace menu
{
namespace ncc
namespace menu::ncc
{
class List : public CBaseContainer
@ -64,4 +62,3 @@ public:
}
};
}
}

View File

@ -23,9 +23,7 @@
#include "menu/ncc/Root.hpp"
#include "menu/ncc/Tooltip.hpp"
namespace menu
{
namespace ncc
namespace menu::ncc
{
class List;
@ -48,4 +46,3 @@ void ShowTooltip(const std::string &text);
void Init();
List &MainList();
}
}

View File

@ -9,9 +9,7 @@
#include "../CBaseContainer.h"
#include "menu/ncc/Menu.hpp"
namespace menu
{
namespace ncc
namespace menu::ncc
{
constexpr int size_table[] = { 32, 32, 80, 160, 80, 80, 32, 32, 32 };
@ -30,4 +28,3 @@ public:
inline virtual void SortByZIndex() override{};
};
}
}

View File

@ -9,9 +9,7 @@
#include "menu/ncc/Menu.hpp"
namespace menu
{
namespace ncc
namespace menu::ncc
{
class PlayerListEntry : public CBaseContainer
@ -76,4 +74,3 @@ public:
};
}
}
}

View File

@ -9,9 +9,7 @@
#include "../CBaseWindow.h"
namespace menu
{
namespace ncc
namespace menu::ncc
{
class Root : public CBaseWindow
@ -25,4 +23,3 @@ public:
inline virtual void MoveChildren() override{};
};
}
}

View File

@ -11,9 +11,7 @@
#include "common.hpp"
namespace menu
{
namespace ncc
namespace menu::ncc
{
class Tooltip : public CTextLabel
@ -29,4 +27,3 @@ public:
}
};
}
}

View File

@ -8,7 +8,7 @@ rm ../install-all # remove install file
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-6-multilib gcc-6 g++-6 libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y
sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-7-multilib gcc-7 g++-7 libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y
#
# Update cathook

View File

@ -22,8 +22,6 @@ CatVar fakelag_amount(CV_INT, "fakelag", "0", "Bad Fakelag");
CatVar serverlag_amount(
CV_INT, "serverlag", "0", "serverlag",
"Lag the server by spamming this many voicecommands per tick");
CatVar serverlag_string(CV_STRING, "serverlag_string", "voicemenu 0 0",
"serverlag string", "String to spam with serverlag");
CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers",
"Crash servers by spamming signon net messages");
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");

View File

@ -24,11 +24,7 @@ enum torun
};
int torun = -1;
std::string Args[3];
namespace hacks
{
namespace tf2
{
namespace global
namespace hacks::tf2::global
{
void runcfg()
{
@ -125,8 +121,6 @@ void runcfg()
torun = -1;
}
}
}
}
static CatCommand cfg_rebase("cfg_setbase", "Rebase config",
[]() { torun = rebase; });

View File

@ -47,7 +47,8 @@ void EntityHitboxCache::Update()
{
InvalidateCache();
if (CE_BAD(parent_ref))
return;
if (GetHitbox(0))
return;
}
void EntityHitboxCache::Init()

View File

@ -13,11 +13,7 @@
#include <PlayerTools.hpp>
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace aimbot
namespace hacks::shared::aimbot
{
// User settings are stored and used by these vars
@ -1346,6 +1342,4 @@ void DrawText()
}
}
#endif
} // namespace aimbot
} // namespace shared
} // namespace hacks
} // namespace hacks::shared::aimbot

View File

@ -7,11 +7,7 @@
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace announcer
namespace hacks::shared::announcer
{
static CatVar enabled(CV_SWITCH, "announcer", "0", "Enable announcer");
@ -181,5 +177,4 @@ void shutdown()
g_IEventManager2->RemoveListener(&listener());
}
}
}
}

View File

@ -8,11 +8,7 @@
#include <hacks/hacklist.hpp>
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace antiaim
namespace hacks::shared::antiaim
{
CatVar communicate(CV_SWITCH, "identify", "0", "identify",
@ -630,5 +626,3 @@ void ProcessUserCmd(CUserCmd *cmd)
g_pLocalPlayer->bUseSilentAngles = true;
}
}
}
}

View File

@ -8,11 +8,7 @@
#include "common.hpp"
#include "hack.hpp"
namespace hacks
{
namespace tf2
{
namespace antibackstab
namespace hacks::tf2::antibackstab
{
bool noaa = false;
static CatVar enabled(CV_SWITCH, "antibackstab", "0", "Enable",
@ -119,5 +115,3 @@ void CreateMove()
}
}
}
}
}

View File

@ -11,11 +11,7 @@
#include "common.hpp"
#include "hack.hpp"
namespace hacks
{
namespace shared
{
namespace anticheat
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");
@ -122,5 +118,3 @@ void Init()
g_IGameEventManager->AddListener(&listener, false);
}
}
}
}

View File

@ -7,11 +7,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf2
{
namespace antidisguise
namespace hacks::tf2::antidisguise
{
static CatVar enabled(CV_SWITCH, "antidisguise", "0", "Remove spy disguise",
@ -54,5 +50,3 @@ void Draw()
}
}
}
}
}

View File

@ -8,11 +8,7 @@
#include "common.hpp"
#include "hacks/Backtrack.hpp"
namespace hacks
{
namespace tf2
{
namespace autobackstab
namespace hacks::tf2::autobackstab
{
// pPaste, thanks to F1ssi0N
@ -70,5 +66,3 @@ void CreateMove()
}
}
}
}
}

View File

@ -5,11 +5,7 @@
* Author: bencat07
*/
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace deadringer
namespace hacks::shared::deadringer
{
static CatVar
enabled(CV_SWITCH, "deadringer_auto", "0", "Auto deadringer",
@ -75,5 +71,3 @@ void CreateMove()
}
}
}
}
}

View File

@ -8,11 +8,7 @@
#include <PlayerTools.hpp>
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace autodetonator
namespace hacks::tf::autodetonator
{
// Vars for user settings
@ -138,5 +134,3 @@ void CreateMove()
return;
}
}
}
}

View File

@ -9,11 +9,7 @@
#include <hacks/AutoHeal.hpp>
#include <hacks/FollowBot.hpp>
namespace hacks
{
namespace tf
{
namespace autoheal
namespace hacks::tf::autoheal
{
static CatVar enabled(CV_SWITCH, "autoheal_enabled", "0", "AutoHeal",
@ -602,5 +598,3 @@ bool CanHeal(int idx)
return true;
}
}
}
}

View File

@ -8,11 +8,7 @@
#include "common.hpp"
#include "hack.hpp"
namespace hacks
{
namespace shared
{
namespace autojoin
namespace hacks::shared::autojoin
{
/*
@ -137,5 +133,3 @@ void Update()
#endif
}
}
}
}

View File

@ -9,11 +9,7 @@
#include <hacks/AutoReflect.hpp>
#include <glez/draw.hpp>
namespace hacks
{
namespace tf
{
namespace autoreflect
namespace hacks::tf::autoreflect
{
// Vars for user settings
@ -246,5 +242,3 @@ void Draw()
#endif
}
}
}
}

View File

@ -9,11 +9,7 @@
#include <hacks/AutoSticky.hpp>
#include <PlayerTools.hpp>
namespace hacks
{
namespace tf
{
namespace autosticky
namespace hacks::tf::autosticky
{
// Vars for user settings
@ -192,5 +188,3 @@ void CreateMove()
return;
}
}
}
}

View File

@ -8,11 +8,7 @@
#include "common.hpp"
#include "hack.hpp"
namespace hacks
{
namespace tf
{
namespace autotaunt
namespace hacks::tf::autotaunt
{
static CatVar enabled(
@ -48,5 +44,3 @@ InitRoutine init([]() {
g_IEventManager2->AddListener(&listener, "player_death", false);
});
}
}
}

View File

@ -10,11 +10,7 @@
#include <boost/circular_buffer.hpp>
#include <glez/draw.hpp>
namespace hacks
{
namespace shared
{
namespace backtrack
namespace hacks::shared::backtrack
{
CatVar enable(CV_SWITCH, "backtrack", "0", "Enable backtrack",
"For legit play only as of right now.");
@ -279,5 +275,3 @@ bool shouldBacktrack()
return false;
}
}
}
}

View File

@ -7,11 +7,7 @@
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace bunnyhop
namespace hacks::shared::bunnyhop
{
// Var for user settings
@ -64,5 +60,3 @@ void CreateMove()
return;
}
}
}
}

View File

@ -8,11 +8,7 @@
#include "common.hpp"
#include "hack.hpp"
namespace hacks
{
namespace shared
{
namespace catbot
namespace hacks::shared::catbot
{
static CatVar enabled(CV_SWITCH, "cbu", "0", "CatBot Utils");
@ -326,5 +322,3 @@ void level_init()
level_init_timer.update();
}
}
}
}

View File

@ -11,11 +11,7 @@
#include <PlayerTools.hpp>
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace esp
namespace hacks::shared::esp
{
// Main Switch
@ -358,7 +354,9 @@ void CreateMove()
CachedEntity *ent = ENTITY(i);
ProcessEntity(ent);
// Update Bones
if (i <= 32)
ent->hitboxes.GetHitbox(0);
// Dont know what this check is for
if (data[i].string_count)
{
@ -1653,5 +1651,3 @@ void SetEntityColor(CachedEntity *entity, const rgba_t &color)
data[entity->m_IDX].color = color;
}
}
}
}

View File

@ -11,11 +11,7 @@
#include <hacks/LagExploit.hpp>
#include <glez/draw.hpp>
namespace hacks
{
namespace shared
{
namespace followbot
namespace hacks::shared::followbot
{
CatVar followbot(CV_SWITCH, "fb", "0", "Followbot Switch",
@ -334,5 +330,3 @@ static CatCommand
});
#endif
}
}
}

View File

@ -7,11 +7,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf2
{
namespace healarrow
namespace hacks::tf2::healarrow
{
static CatVar healarrow_charge(CV_FLOAT, "healarrow_charge", "0.25",
@ -148,5 +144,3 @@ void Draw()
#endif
}
}
}
}

View File

@ -8,11 +8,7 @@
#include <hacks/KillSay.hpp>
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace killsay
namespace hacks::shared::killsay
{
static CatEnum killsay_enum({ "NONE", "CUSTOM", "DEFAULT", "NCC - OFFENSIVE",
@ -161,8 +157,6 @@ const std::vector<std::string> builtin_nonecore_mlg = {
"U GOT QUICKSCOPED M8", "2 FAST 4 U, SCRUB", "U GOT REKT, M8"
};
}
}
}
void KillSayEventListener::FireGameEvent(IGameEvent *event)
{

View File

@ -8,11 +8,7 @@
#include "common.hpp"
#include "hooks.hpp"
namespace hacks
{
namespace tf2
{
namespace killstreak
namespace hacks::tf2::killstreak
{
static CatVar enabled(CV_SWITCH, "killstreak", "0",
@ -139,5 +135,3 @@ void init()
{
}
}
}
}

View File

@ -9,11 +9,7 @@
#include <hacks/Announcer.hpp>
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace lagexploit
namespace hacks::shared::lagexploit
{
static CatVar toggle(CV_SWITCH, "se_toggle", "0", "toggle",
@ -94,6 +90,28 @@ float servertime, nextattack, nextattack2;
static int lastwep = 0;
void CreateMove()
{
if (!bcalled)
for (int i = 1; i < HIGHEST_ENTITY; i++)
{
CachedEntity *pEnt = ENTITY(i);
if (!CE_GOOD(pEnt))
continue;
const model_t *model = RAW_ENT(pEnt)->GetModel();
if (!model)
continue;
const char *model_name = g_IModelInfo->GetModelName(model);
if (strstr("models/props_gameplay/cap_point_base.mdl", model_name))
pointarr[0] = model;
if (strstr("models/props_trainyard/bomb_cart.mdl", model_name))
pointarr[1] = model;
if (strstr("models/props_2fort/trainwheel001.mdl", model_name))
pointarr[2] = model;
if (strstr("models/custom/dirty_bomb_cart.mdl", model_name))
pointarr[3] = model;
if (strstr("models/props_trainyard/bomb_cart_red.mdl", model_name))
pointarr[4] = model;
}
bcalled = true;
if (!master_switch)
return;
active = false;
@ -170,28 +188,6 @@ void CreateMove()
if (!g_pUserCmd->command_number)
return;
int amount = 0;
if (!bcalled)
for (int i = 1; i < HIGHEST_ENTITY; i++)
{
CachedEntity *pEnt = ENTITY(i);
if (!CE_GOOD(pEnt))
continue;
const model_t *model = RAW_ENT(pEnt)->GetModel();
if (!model)
continue;
const char *model_name = g_IModelInfo->GetModelName(model);
if (strstr("models/props_gameplay/cap_point_base.mdl", model_name))
pointarr[0] = model;
if (strstr("models/props_trainyard/bomb_cart.mdl", model_name))
pointarr[1] = model;
if (strstr("models/props_2fort/trainwheel001.mdl", model_name))
pointarr[2] = model;
if (strstr("models/custom/dirty_bomb_cart.mdl", model_name))
pointarr[3] = model;
if (strstr("models/props_trainyard/bomb_cart_red.mdl", model_name))
pointarr[4] = model;
}
bcalled = true;
if (cart)
{
for (int i = 1; i < HIGHEST_ENTITY; i++)
@ -586,5 +582,3 @@ void Draw()
#endif
}
}
}
}

View File

@ -1,11 +1,7 @@
#include <glez/draw.hpp>
#include "hacks/LightESP.hpp"
namespace hacks
{
namespace shared
{
namespace lightesp
namespace hacks::shared::lightesp
{
static CatVar enable(CV_SWITCH, "lightesp_enabled", "0", "Enable LightESP",
@ -80,5 +76,3 @@ rgba_t LightESPColor(CachedEntity *ent)
return colors::green;
}
}
}
}

View File

@ -19,11 +19,7 @@
#include "hack.hpp"
#include "common.hpp"
namespace hacks
{
namespace shared
{
namespace misc
namespace hacks::shared::misc
{
static CatVar debug_info(CV_SWITCH, "debug_info", "0", "Debug info",
@ -707,9 +703,7 @@ static CatCommand
const char *ft = (args.ArgC() > 1 ? args[2] : 0);
DumpRecvTable(ent, clz->m_pRecvTable, 0, ft, 0);
});
} // namespace misc
} // namespace shared
} // namespace hacks
} // namespace hacks::shared::misc
/*void DumpRecvTable(CachedEntity* ent, RecvTable* table, int depth, const char*
ft, unsigned acc_offset) { bool forcetable = ft && strlen(ft); if (!forcetable

View File

@ -7,11 +7,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf2
{
namespace noisemaker
namespace hacks::tf2::noisemaker
{
static CatVar
@ -33,5 +29,3 @@ void CreateMove()
return;
}
}
}
}

View File

@ -12,11 +12,7 @@
#ifndef FEATURE_RADAR_DISABLED
#if ENABLE_VISUALS
namespace hacks
{
namespace tf
{
namespace radar
namespace hacks::tf::radar
{
static CatVar size(CV_INT, "radar_size", "300", "Radar size",
@ -280,8 +276,6 @@ void Draw()
colors::Transparent(GUIColor(), 0.4f), 0.5f);
}
}
}
}
#endif
#endif

View File

@ -11,11 +11,7 @@
#include <sys/stat.h>
#include <hacks/SkinChanger.hpp>
namespace hacks
{
namespace tf2
{
namespace skinchanger
namespace hacks::tf2::skinchanger
{
// Because fuck you, that's why.
@ -520,5 +516,3 @@ std::unordered_map<int, def_attribute_modifier> modifier_map{};
// std::unordered_map<int, patched_weapon_cookie> cookie_map {};
patched_weapon_cookie cookie{ 0 };
}
}
}

View File

@ -9,11 +9,7 @@
#include "common.hpp"
#include "MiscTemporary.hpp"
namespace hacks
{
namespace shared
{
namespace spam
namespace hacks::shared::spam
{
static CatEnum spam_enum({ "DISABLED", "CUSTOM", "DEFAULT", "LENNYFACES",
"BLANKS", "NULLCORE", "LMAOBOX", "LITHIUM" });
@ -444,5 +440,3 @@ const std::vector<std::string> builtin_lithium = {
"GOT ROLLED BY LITHIUM? HEY, THAT MEANS IT'S TIME TO GET LITHIUMCHEAT!!"
};
}
}
}

View File

@ -7,11 +7,7 @@
#include "common.hpp"
namespace hacks
{
namespace tf
{
namespace spyalert
namespace hacks::tf::spyalert
{
static CatVar enabled(CV_SWITCH, "spyalert_enabled", "0", "Enable",
@ -116,5 +112,3 @@ void Draw()
}
}
}
}
}

View File

@ -11,11 +11,7 @@
#include <hacks/Backtrack.hpp>
#include <PlayerTools.hpp>
namespace hacks
{
namespace shared
{
namespace triggerbot
namespace hacks::shared::triggerbot
{
// Vars for usersettings
@ -709,5 +705,3 @@ void Draw()
{
}
}
}
}

View File

@ -8,11 +8,7 @@
#include "common.hpp"
#include <hacks/UberSpam.hpp>
namespace hacks
{
namespace tf
{
namespace uberspam
namespace hacks::tf::uberspam
{
TextFile custom_lines;
@ -138,5 +134,3 @@ const std::vector<std::string> builtin_nonecore = {
">>> RUMBLE COMPLETE! <<<", ">>> RUMBLE IS %i%% CHARGED! <<<"
};
}
}
}

View File

@ -14,11 +14,7 @@
#include <hacks/hacklist.hpp>
#include <glez/draw.hpp>
namespace hacks
{
namespace shared
{
namespace walkbot
namespace hacks::shared::walkbot
{
using index_t = unsigned;
@ -1297,5 +1293,3 @@ void Move()
}
}
}
}
}

View File

@ -9,9 +9,7 @@
#include <hacks/AntiCheat.hpp>
#include "common.hpp"
namespace ac
{
namespace aimbot
namespace ac::aimbot
{
static CatVar enabled(CV_SWITCH, "ac_aimbot", "1", "Detect Aimbot",
@ -122,4 +120,3 @@ void Event(KeyValues *event)
}
}
}
}

View File

@ -8,10 +8,9 @@
#include <hacks/AntiCheat.hpp>
#include "common.hpp"
namespace ac
{
namespace antiaim
namespace ac::antiaim
{
static CatVar enabled(CV_SWITCH, "ac_antiaim", "1", "Detect Antiaim");
unsigned long last_accusation[32]{ 0 };
@ -75,4 +74,4 @@ void Event(KeyValues *event)
{
}
}
}

View File

@ -8,9 +8,7 @@
#include <hacks/AntiCheat.hpp>
#include "common.hpp"
namespace ac
{
namespace bhop
namespace ac::bhop
{
static CatVar bhop_detect_count(CV_INT, "ac_bhop_count", "4",
@ -83,4 +81,3 @@ void Event(KeyValues *event)
{
}
}
}

View File

@ -89,6 +89,7 @@ void RunEnginePrediction(IClientEntity *ent, CUserCmd *ucmd)
#else
#define antikick_time 90
#endif
const char *cmds[7] = {"use", "voicecommand", "spec_next", "spec_prev", "spec_player", "invprev", "invnext"};
namespace hooked_methods
{
DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
@ -526,15 +527,23 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
g_Settings.last_angles = cmd->viewangles;
}
#endif
NET_StringCmd senddata(serverlag_string.GetString());
int nextdata = 0;
NET_StringCmd senddata(cmds[nextdata]);
INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
senddata.SetNetChannel(ch);
senddata.SetReliable(false);
if (servercrash && DelayTimer.check((int) delay * 1000))
{
for (int i = 0; i < 7800; i += sizeof(serverlag_string.GetString()))
for (int i = 0; i < 7800; i += sizeof(cmds[nextdata]))
{
senddata.m_szCommand = cmds[nextdata];
ch->SendNetMsg(senddata);
if (nextdata == 6)
nextdata = 0;
else
nextdata++;
}
ch->Transmit();
}
if (serverlag_amount || (votelogger::active &&
@ -570,15 +579,29 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
if (prevflowticks <= 10)
additionallag *= 0.1f;
for (int i = 0; i < 7800 + additionallag;
i += sizeof(serverlag_string.GetString()))
i += sizeof(cmds[nextdata]))
{
senddata.m_szCommand = cmds[nextdata];
ch->SendNetMsg(senddata, false);
if (nextdata == 6)
nextdata = 0;
else
nextdata++;
}
ch->Transmit();
}
else if (!votelogger::active && serverlag_amount &&
DelayTimer.check((int) delay * 1000))
{
for (int i = 0; i < (int) serverlag_amount; i++)
{
senddata.m_szCommand = cmds[nextdata];
if (nextdata == 6)
nextdata = 0;
else
nextdata++;
ch->SendNetMsg(senddata, false);
}
ch->Transmit();
}
prevflow = ch->GetAvgData(FLOW_INCOMING);