commit
e45acd8805
@ -27,7 +27,7 @@ and a lot of useful features, including
|
|||||||
|
|
||||||
Ubuntu dependencies installation:
|
Ubuntu dependencies installation:
|
||||||
```bash
|
```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 -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb libsdl2-dev libglew-dev libfreetype6-dev libfreetype6-dev:i386 -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 -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb libsdl2-dev libglew-dev libfreetype6-dev libfreetype6-dev:i386 -y
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ int g_AppID = 0;
|
|||||||
|
|
||||||
void ThirdpersonCallback(IConVar* var, const char* pOldValue, float flOldValue) {
|
void ThirdpersonCallback(IConVar* var, const char* pOldValue, float flOldValue) {
|
||||||
if (force_thirdperson.convar_parent && !force_thirdperson) {
|
if (force_thirdperson.convar_parent && !force_thirdperson) {
|
||||||
if (g_pLocalPlayer && g_pLocalPlayer->entity)
|
if (g_pLocalPlayer && CE_GOOD(g_pLocalPlayer->entity))
|
||||||
CE_INT(g_pLocalPlayer->entity, netvar.nForceTauntCam) = 0;
|
CE_INT(g_pLocalPlayer->entity, netvar.nForceTauntCam) = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ void CatVar_Integer(CatVar& var) {
|
|||||||
int value = var;
|
int value = var;
|
||||||
ImGui::PushItemWidth(120.0f);
|
ImGui::PushItemWidth(120.0f);
|
||||||
int step = var.restricted ? (var.max - var.min) / 50 : 1;
|
int step = var.restricted ? (var.max - var.min) / 50 : 1;
|
||||||
|
if (step == 0) step = 1;
|
||||||
if (ImGui::InputInt(label, &value, step, step * 20)) {
|
if (ImGui::InputInt(label, &value, step, step * 20)) {
|
||||||
var = value;
|
var = value;
|
||||||
}
|
}
|
||||||
|
@ -272,6 +272,7 @@ void hack::Initialize() {
|
|||||||
hacks::shared::anticheat::Init();
|
hacks::shared::anticheat::Init();
|
||||||
hacks::tf2::healarrow::Init();
|
hacks::tf2::healarrow::Init();
|
||||||
InitSpinner();
|
InitSpinner();
|
||||||
|
hacks::shared::spam::Init();
|
||||||
logging::Info("Initialized Fidget Spinner");
|
logging::Info("Initialized Fidget Spinner");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ CatVar enabled(CV_SWITCH, "reflect_enabled", "0", "Auto Reflect", "Master AutoRe
|
|||||||
CatVar idle_only(CV_SWITCH, "reflect_only_idle", "0", "Only when not shooting", "Don't AutoReflect if you're holding M1");
|
CatVar idle_only(CV_SWITCH, "reflect_only_idle", "0", "Only when not shooting", "Don't AutoReflect if you're holding M1");
|
||||||
CatVar legit(CV_SWITCH, "reflect_legit", "0", "Legit Reflect", "Only Auto-airblasts projectiles that you can see, doesnt move your crosshair");
|
CatVar legit(CV_SWITCH, "reflect_legit", "0", "Legit Reflect", "Only Auto-airblasts projectiles that you can see, doesnt move your crosshair");
|
||||||
CatVar dodgeball(CV_SWITCH, "reflect_dodgeball", "0", "Dodgeball Mode", "Allows auto-reflect to work in dodgeball servers");
|
CatVar dodgeball(CV_SWITCH, "reflect_dodgeball", "0", "Dodgeball Mode", "Allows auto-reflect to work in dodgeball servers");
|
||||||
|
CatVar blastkey(CV_KEY, "reflect_key", "0", "Reflect Key", "Hold this key to activate auto-airblast");
|
||||||
CatVar stickies(CV_SWITCH, "reflect_stickybombs", "0", "Reflect stickies", "Reflect Stickybombs");
|
CatVar stickies(CV_SWITCH, "reflect_stickybombs", "0", "Reflect stickies", "Reflect Stickybombs");
|
||||||
// TODO setup proj sorting
|
// TODO setup proj sorting
|
||||||
// TODO CatVar big_proj(CV_SWITCH, "reflect_big_projectile", "0", "Reflect big projectiles", "Reflect Rockets");
|
// TODO CatVar big_proj(CV_SWITCH, "reflect_big_projectile", "0", "Reflect big projectiles", "Reflect Rockets");
|
||||||
@ -29,6 +29,7 @@ CatVar stickies(CV_SWITCH, "reflect_stickybombs", "0", "Reflect stickies", "Refl
|
|||||||
void CreateMove() {
|
void CreateMove() {
|
||||||
// Check if user settings allow Auto Reflect
|
// Check if user settings allow Auto Reflect
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
|
if (blastkey && !blastkey.KeyDown()) return;
|
||||||
|
|
||||||
// Check if player is using a flame thrower
|
// Check if player is using a flame thrower
|
||||||
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlameThrower)) return;
|
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlameThrower)) return;
|
||||||
|
@ -82,6 +82,9 @@ void Reload() {
|
|||||||
|
|
||||||
void Init() {
|
void Init() {
|
||||||
g_IEventManager2->AddListener(&getListener(), (const char*)"player_death", false);
|
g_IEventManager2->AddListener(&getListener(), (const char*)"player_death", false);
|
||||||
|
filename.InstallChangeCallback([](IConVar* var, const char* pszOV, float flOV) {
|
||||||
|
file.TryLoad(std::string(filename.GetString()));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shutdown() {
|
void Shutdown() {
|
||||||
|
@ -144,6 +144,12 @@ int QueryPlayer(Query query) {
|
|||||||
return index_result;
|
return index_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Init() {
|
||||||
|
filename.InstallChangeCallback([](IConVar* var, const char* pszOV, float flOV) {
|
||||||
|
file.TryLoad(std::string(filename.GetString()));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool SubstituteQueries(std::string& input) {
|
bool SubstituteQueries(std::string& input) {
|
||||||
size_t index = input.find("%query:");
|
size_t index = input.find("%query:");
|
||||||
while (index != std::string::npos) {
|
while (index != std::string::npos) {
|
||||||
|
@ -25,6 +25,7 @@ extern CatVar enabled;
|
|||||||
extern CatVar filename;
|
extern CatVar filename;
|
||||||
extern CatCommand reload;
|
extern CatCommand reload;
|
||||||
|
|
||||||
|
void Init();
|
||||||
void CreateMove();
|
void CreateMove();
|
||||||
void Reset();
|
void Reset();
|
||||||
void Reload();
|
void Reload();
|
||||||
|
@ -13,25 +13,6 @@
|
|||||||
#include "hookedmethods.h"
|
#include "hookedmethods.h"
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
|
|
||||||
// FIXME remove this temporary code already!
|
|
||||||
float AngleDiff( float destAngle, float srcAngle )
|
|
||||||
{
|
|
||||||
float delta;
|
|
||||||
|
|
||||||
delta = fmodf(destAngle - srcAngle, 360.0f);
|
|
||||||
if ( destAngle > srcAngle )
|
|
||||||
{
|
|
||||||
if ( delta >= 180 )
|
|
||||||
delta -= 360;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( delta <= -180 )
|
|
||||||
delta += 360;
|
|
||||||
}
|
|
||||||
return delta;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "../profiler.h"
|
#include "../profiler.h"
|
||||||
|
|
||||||
static CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump", "Allows jumping while shooting with minigun");
|
static CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump", "Allows jumping while shooting with minigun");
|
||||||
@ -39,6 +20,8 @@ static CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
|||||||
CatVar jointeam(CV_SWITCH, "fb_autoteam", "1", "Joins player team automatically (NYI)");
|
CatVar jointeam(CV_SWITCH, "fb_autoteam", "1", "Joins player team automatically (NYI)");
|
||||||
CatVar joinclass(CV_STRING, "fb_autoclass", "spy", "Class that will be picked after joining a team (NYI)");
|
CatVar joinclass(CV_STRING, "fb_autoclass", "spy", "Class that will be picked after joining a team (NYI)");
|
||||||
|
|
||||||
|
CatVar nolerp(CV_SWITCH, "nolerp", "0", "NoLerp mode (experimental)");
|
||||||
|
|
||||||
class CMoveData;
|
class CMoveData;
|
||||||
namespace engine_prediction {
|
namespace engine_prediction {
|
||||||
|
|
||||||
@ -180,6 +163,17 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
|||||||
time_replaced = false;
|
time_replaced = false;
|
||||||
curtime_old = g_GlobalVars->curtime;
|
curtime_old = g_GlobalVars->curtime;
|
||||||
|
|
||||||
|
static ConVar* sv_client_min_interp_ratio = g_ICvar->FindVar("sv_client_min_interp_ratio");
|
||||||
|
static ConVar* cl_interp = g_ICvar->FindVar("cl_interp");
|
||||||
|
static ConVar* cl_interp_ratio = g_ICvar->FindVar("cl_interp_ratio");
|
||||||
|
|
||||||
|
if (nolerp) {
|
||||||
|
g_pUserCmd->tick_count += 1;
|
||||||
|
if (sv_client_min_interp_ratio->GetInt() != -1) sv_client_min_interp_ratio->SetValue(-1);
|
||||||
|
if (cl_interp->GetInt() != 0) cl_interp->SetValue(0);
|
||||||
|
if (cl_interp_ratio->GetInt() != 0) cl_interp_ratio->SetValue(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) {
|
if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) {
|
||||||
servertime = (float)CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick;
|
servertime = (float)CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick;
|
||||||
g_GlobalVars->curtime = servertime;
|
g_GlobalVars->curtime = servertime;
|
||||||
@ -188,6 +182,9 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
|||||||
if (g_Settings.bInvalid) {
|
if (g_Settings.bInvalid) {
|
||||||
entity_cache::Invalidate();
|
entity_cache::Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disabled because this causes EXTREME aimbot inaccuracy
|
||||||
|
//if (!cmd->command_number) return ret;
|
||||||
// PROF_BEGIN();
|
// PROF_BEGIN();
|
||||||
{
|
{
|
||||||
PROF_SECTION(EntityCache);
|
PROF_SECTION(EntityCache);
|
||||||
@ -203,8 +200,6 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
|||||||
SAFE_CALL(g_pLocalPlayer->Update());
|
SAFE_CALL(g_pLocalPlayer->Update());
|
||||||
}
|
}
|
||||||
g_Settings.bInvalid = false;
|
g_Settings.bInvalid = false;
|
||||||
// Disabled because this causes EXTREME aimbot inaccuracy
|
|
||||||
//if (!cmd->command_number) return ret;
|
|
||||||
#ifdef IPC_ENABLED
|
#ifdef IPC_ENABLED
|
||||||
static int team_joining_state = 0;
|
static int team_joining_state = 0;
|
||||||
static float last_jointeam_try = 0;
|
static float last_jointeam_try = 0;
|
||||||
|
@ -18,6 +18,21 @@
|
|||||||
TextFile::TextFile()
|
TextFile::TextFile()
|
||||||
: lines {} {}
|
: lines {} {}
|
||||||
|
|
||||||
|
bool TextFile::TryLoad(std::string name) {
|
||||||
|
if (name.length() == 0) return false;
|
||||||
|
std::string filename = format("cathook/", name);
|
||||||
|
std::ifstream file(filename, std::ios::in);
|
||||||
|
if (!file) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lines.clear();
|
||||||
|
for (std::string line; std::getline(file, line);) {
|
||||||
|
if (*line.rbegin() == '\r') line.erase(line.length() - 1, 1);
|
||||||
|
lines.push_back(line);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void TextFile::Load(std::string name) {
|
void TextFile::Load(std::string name) {
|
||||||
std::string filename = format("cathook/", name);
|
std::string filename = format("cathook/", name);
|
||||||
std::ifstream file(filename, std::ios::in);
|
std::ifstream file(filename, std::ios::in);
|
||||||
@ -27,6 +42,7 @@ void TextFile::Load(std::string name) {
|
|||||||
}
|
}
|
||||||
lines.clear();
|
lines.clear();
|
||||||
for (std::string line; std::getline(file, line);) {
|
for (std::string line; std::getline(file, line);) {
|
||||||
|
if (*line.rbegin() == '\r') line.erase(line.length() - 1, 1);
|
||||||
lines.push_back(line);
|
lines.push_back(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ class TextFile {
|
|||||||
public:
|
public:
|
||||||
TextFile();
|
TextFile();
|
||||||
void Load(std::string filename);
|
void Load(std::string filename);
|
||||||
|
bool TryLoad(std::string filename);
|
||||||
size_t LineCount() const;
|
size_t LineCount() const;
|
||||||
const std::string& Line(size_t id) const;
|
const std::string& Line(size_t id) const;
|
||||||
public:
|
public:
|
||||||
|
@ -113,7 +113,8 @@
|
|||||||
"reflect_legit",
|
"reflect_legit",
|
||||||
"reflect_only_idle",
|
"reflect_only_idle",
|
||||||
"reflect_stickybombs",
|
"reflect_stickybombs",
|
||||||
"reflect_dodgeball"
|
"reflect_dodgeball",
|
||||||
|
"reflect_key"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user