Merge branch 'master' into master

This commit is contained in:
nullifiedcat 2017-07-21 21:05:57 +03:00 committed by GitHub
commit ac7cf534fb
38 changed files with 1575 additions and 685 deletions

View File

@ -27,7 +27,7 @@ and a lot of useful features, including
Ubuntu dependencies installation:
```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
```

198
TODO
View File

@ -1,67 +1,141 @@
MULTIPLATFORM:
Signature Scanner
Whole IPC thing | actually, no. cathook for windows WON'T have followbots/ipc.
Signatures and offsets
File handling (playerlist, spam, etc...)
CMake?
------------====-----------
//==================================================================================================//
//Big TODO list for cathook //
//Organized by Julianacat //
//==================================================================================================//
TF2C teams
TF2C merc
HL2DM teams
fullbright toggle
Hunter Rifle
TTS
namesteal
autovote
voice command spam (not like 1 voice command every 1 ms but like just spamming it on the menu)
//----------------------------------------------------------------------------------------------------------------------//
//Aimbot/Triggerbot //
//------------------------------------------------------------------------------------------------------------------// //
// //
Hook + Aimbot FIX // //
// //
no aim sapper // //
// //
Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets // //
Proper AutoHitbox, Isnt this already a thing?? // //
// //
Flare aim on fire // //
Improve Projectile Aimbot. A lot. // //
ProjPredOrigin // //
MAX -> MIN priority // //
// //
Hunter Rifle? // //
// //
AutoDetonator // //
// //
No AutoShoot when disguised // //
Ambassador bodyshotting // //
No Trigger Mediguns // //
More projectile weapons aimbot (wrap assassin, wrangler, stickybomb, airstrike) // //
Auto trigger DR before rockets // //
// //
Make make sentrys slightly lower priority (for getting those pesky turtle engies) // //
// //
Make building aimbot compensate for gravity on projectile weapons // //
// //
add Spectator Silent for projectile weapons // //
// //
Improve aimbot accuracy // //
// //
Add Multipoint (Take hitbox, shrink it, then use corners as points to check) // //
// //
Make ambasador check rely on wait for charge user setting // //
// //
//------------------------------------------------------------------------------------------------------------------// //
// //
//----------------------------------------------------------------------------------------------------------------------//
dominatesay assistsay worldsay
AutoDetonator
//----------------------------------------------------------------------------------------------------------------------//
//Visuals/GUI //
//------------------------------------------------------------------------------------------------------------------// //
// //
Display on the left // //
// //
make gui color change // //
// //
Cheat status menu (A gui to display enabled/disabled states of user settings for when the menu is off) // //
// //
add teleporter count down // //
add spy cloak esp // //
// //
Make ubercharge esp color RGB when fully charged // //
// //
fullbright toggle // //
// //
FLAG ESP? // //
// //
ESP Icons // //
ESP Distance sort // //
Show sapped buildings in ESP // //
halloween medkits // //
carrying esp // //
Tracers/Spy Cam // //
// //
//------------------------------------------------------------------------------------------------------------------// //
// //
//----------------------------------------------------------------------------------------------------------------------//
ProjPredOrigin
MAX -> MIN priority
Deflected by enemy player
Aim Stickies
FLAG ESP
no aim sapper
Improve Projectile Aimbot. A lot.
Proper AutoHitbox
Display on the left
Flare aim on fire
Aim Sticky
Proj Pred visuals
Hook + Aimbot FIX
ESP Icons
ESP Distance sort
Show sapped buildings in ESP
Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets
Fake Lag
Engine Prediction
AutoSticky improve
No AutoShoot when disguised
Ambassador bodyshotting
No Trigger Mediguns
More projectile weapons aimbot (wrap assassin, wrangler, stickybomb, airstrike)
Auto trigger DR before rockets
Sticky vischeck
InsultSpam
Critical rifles bodyshotting
FLAG ESP
Spy alert uses angles
halloween medkits
carrying esp
Tracers/Spy Cam
Bodyshot if not zoomed
Proper medic followbot AI
Bot option for aiming at owner's prey (just for fun)
Bot pathfinding & navigation files system
Proper entity classes (actually I might just use a lot of helper functions taking IClientEntity* as first arg)
Priority system optimization and testing
General optimization and refactoring
Bone ESP
XorString or something to make it harder to detect.
//----------------------------------------------------------------------------------------------------------------------//
//Chat and Related //
//------------------------------------------------------------------------------------------------------------------// //
// //
TTS // //
namesteal // //
autovote // //
// //
dominatesay assistsay worldsay // //
InsultSpam // //
// //
//------------------------------------------------------------------------------------------------------------------// //
// //
//----------------------------------------------------------------------------------------------------------------------//
//----------------------------------------------------------------------------------------------------------------------//
//Followbots //
//------------------------------------------------------------------------------------------------------------------// //
// //
Proper medic followbot AI, breadcrumb followbot is good but a nav system would be better // //
// //
Bot option for aiming at owner's prey (just for fun) // //
Bot pathfinding & navigation files system // //
Proper entity classes (actually I might just use a lot of helper functions taking IClientEntity* as first arg) // //
// //
//------------------------------------------------------------------------------------------------------------------// //
// //
//----------------------------------------------------------------------------------------------------------------------//
//----------------------------------------------------------------------------------------------------------------------//
//Misc //
//------------------------------------------------------------------------------------------------------------------// //
// //
Proper Fake Lag // //
Add auto-strafe // //
// //
Fix achievement hack getting blocked with sv_cheats // //
// //
Spy alert uses angles // //
// //
Add ignore gunslinger to melee crit hack // //
// //
Priority system optimization and testing // //
General optimization and refactoring // //
// //
XorString or something to make it harder to detect. // //
// //
TF2C teams // //
TF2C merc // //
HL2DM teams // //
// //
//------------------------------------------------------------------------------------------------------------------// //
// //
//----------------------------------------------------------------------------------------------------------------------//

View File

@ -1,14 +1,14 @@
const fs = require('fs');
const fs = require("fs");
var full_class_table = {};
try {
full_class_table = JSON.parse(fs.readFileSync('full-class-table.json').toString());
full_class_table = JSON.parse(fs.readFileSync("full-class-table.json").toString());
} catch (e) {}
const file = fs.readFileSync(process.argv[2]).toString().split('\n');
const file = fs.readFileSync(process.argv[2]).toString().split("\n");
const modname = process.argv[3];
console.log('Generating info for', modname, 'from', process.argv[2]);
console.log("Generating info for", modname, "from", process.argv[2]);
var classes = {};
for (var i in file) {
@ -19,7 +19,7 @@ for (var i in file) {
}
}
fs.writeFileSync('full-class-table.json', JSON.stringify(full_class_table));
fs.writeFileSync("full-class-table.json", JSON.stringify(full_class_table));
var header_constexpr = `/*
AUTO-GENERATED HEADER - DO NOT MODIFY
@ -50,10 +50,10 @@ namespace client_classes {
`;
for (var clz in full_class_table) {
var value = '0';
var value = "0";
if (classes[clz]) value = classes[clz];
header_constexpr += '\t\tstatic constexpr int ' + clz + ' = ' + value + ';\n';
header += '\t\tint ' + clz + ' { ' + value + ' };\n';
header_constexpr += "\t\tstatic constexpr int " + clz + " = " + value + ";\n";
header += "\t\tint " + clz + " { " + value + " };\n";
}
header += `
@ -70,8 +70,8 @@ header_constexpr += `
#endif /* $mod_CONSTEXPR_AUTOGEN_HPP */`;
fs.writeFileSync('src/classinfo/' + modname + '.gen.hpp', header.replace(/\$mod/g, modname));
fs.writeFileSync('src/classinfo/' + modname + '_constexpr.gen.hpp', header_constexpr.replace(/\$mod/g, modname));
fs.writeFileSync("src/classinfo/" + modname + ".gen.hpp", header.replace(/\$mod/g, modname));
fs.writeFileSync("src/classinfo/" + modname + "_constexpr.gen.hpp", header_constexpr.replace(/\$mod/g, modname));
console.log(classes);
console.log(classes);

View File

@ -1,11 +1,11 @@
const fs = require('fs');
const fs = require("fs");
var full_class_table = {};
try {
full_class_table = JSON.parse(fs.readFileSync('full-class-table.json').toString());
full_class_table = JSON.parse(fs.readFileSync("full-class-table.json").toString());
} catch (e) {}
console.log('Generating dummy class header');
console.log("Generating dummy class header");
var header = `/*
AUTO-GENERATED HEADER - DO NOT MODIFY
@ -22,7 +22,7 @@ namespace client_classes {
`;
for (var clz in full_class_table) {
header += '\t\tint ' + clz + ' { 0 };\n';
header += "\t\tint " + clz + " { 0 };\n";
}
header += `
@ -33,4 +33,4 @@ header += `
#endif /* DUMMY_AUTOGEN_HPP */`;
fs.writeFileSync('src/classinfo/dummy.gen.hpp', header);
fs.writeFileSync("src/classinfo/dummy.gen.hpp", header);

View File

@ -1,11 +1,11 @@
const fs = require('fs');
const fs = require("fs");
var full_class_table = {};
try {
full_class_table = JSON.parse(fs.readFileSync('full-class-table.json').toString());
full_class_table = JSON.parse(fs.readFileSync("full-class-table.json").toString());
} catch (e) {}
console.log('Generating dummy class header');
console.log("Generating dummy class header");
var header = `/*
AUTO-GENERATED HEADER - DO NOT MODIFY
@ -24,7 +24,7 @@ namespace client_classes {
`;
for (var clz in full_class_table) {
header += '\t\tint ' + clz + ' { 0 };\n';
header += "\t\tint " + clz + " { 0 };\n";
}
header += `
@ -35,7 +35,7 @@ header += `
#endif /* DYNAMIC_AUTOGEN_HPP */`;
var POPULATED_MAP = '';
var POPULATED_MAP = "";
for (var clz in full_class_table) {
POPULATED_MAP += `\t\tclassid_mapping["${clz}"] = &${clz};\n`;
@ -69,5 +69,5 @@ dynamic dynamic_list;
}`;
fs.writeFileSync('src/classinfo/dynamic.gen.hpp', header);
fs.writeFileSync('src/classinfo/dynamic.gen.cpp', source);
fs.writeFileSync("src/classinfo/dynamic.gen.hpp", header);
fs.writeFileSync("src/classinfo/dynamic.gen.cpp", source);

View File

@ -1,19 +1,32 @@
ifndef CLANG
CXX=$(shell sh -c "which g++-6 || which g++")
CC=$(shell sh -c "which gcc-6 || which gcc")
LD=$(CXX)
else
CXX=clang++
CC=clang
LD=ld.lld
endif
DEFINES=_GLIBCXX_USE_CXX11_ABI=0 _POSIX=1 FREETYPE_GL_USE_VAO RAD_TELEMETRY_DISABLED LINUX=1 USE_SDL _LINUX=1 POSIX=1 GNUC=1 NO_MALLOC_OVERRIDE
WARNING_FLAGS=-pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef
COMMON_FLAGS=-fpermissive -O3 -shared -Wno-unknown-pragmas -fmessage-length=0 -m32 -fvisibility=hidden -fPIC -march=native
COMMON_FLAGS=-fpermissive -O3 -shared -Wno-unknown-pragmas -fmessage-length=0 -m32 -fvisibility=hidden -fPIC -march=native -mtune=native
ifdef CLANG
COMMON_FLAGS+=-Wno-c++11-narrowing
endif
ifdef BUILD_DEBUG
COMMON_FLAGS+=-g3 -ggdb
else
ifndef CLANG
COMMON_FLAGS+=-flto
endif
endif
CFLAGS=$(COMMON_FLAGS)
CXXFLAGS=-std=gnu++1z $(COMMON_FLAGS)
CXXFLAGS=-std=gnu++14 $(COMMON_FLAGS)
ifndef NO_WARNINGS
CFLAGS+=$(WARNING_FLAGS)
@ -27,11 +40,19 @@ SDKFOLDER=$(realpath source-sdk-2013/mp/src)
SIMPLE_IPC_DIR = $(realpath simple-ipc/src/include)
INCLUDES=-Iucccccp -isystemsrc/freetype-gl -isystemsrc/imgui -isystem/usr/local/include/freetype2 -isystem/usr/include/freetype2 -I$(SIMPLE_IPC_DIR) -isystem$(SDKFOLDER)/public -isystem$(SDKFOLDER)/mathlib -isystem$(SDKFOLDER)/common -isystem$(SDKFOLDER)/public/tier1 -isystem$(SDKFOLDER)/public/tier0 -isystem$(SDKFOLDER)
LIB_DIR=lib
LDFLAGS=-m32 -fno-gnu-unique -D_GLIBCXX_USE_CXX11_ABI=0 -shared -L$(realpath $(LIB_DIR))
LDFLAGS=-shared -L$(realpath $(LIB_DIR))
ifdef CLANG
LDFLAGS+=-melf_i386
else
LDFLAGS+=-m32 -fno-gnu-unique
endif
ifndef BUILD_DEBUG
ifndef CLANG
LDFLAGS+=-flto
endif
LDLIBS=-static -lc -lstdc++ -ltier0 -lvstdlib -l:libSDL2-2.0.so.0 -static -lGLEW -lfreetype -lpthread
endif
LDLIBS=-l:libSDL2-2.0.so.0 -static -l:libc.so.6 -static -l:libstdc++.so.6 -l:libtier0.so -l:libvstdlib.so -static -l:libGLEW.so -l:libfreetype.so
SRC_DIR = src
RES_DIR = res
OUT_NAME = libcathook.so
@ -126,7 +147,7 @@ src/sdk/utlbuffer.o : CFLAGS+=-w
$(TARGET): $(OBJECTS)
@echo Building cathook
@$(CXX) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $(TARGET)
$(LD) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(LDLIBS)
clean:
find src -type f -name '*.o' -delete

View File

@ -22,7 +22,10 @@ static CatVar ammobox(CV_SWITCH, "chams_ammo", "0", "Ammoboxes", "Render chams o
static CatVar buildings(CV_SWITCH, "chams_buildings", "0", "Buildings", "Render chams on buildings");
static CatVar stickies(CV_SWITCH, "chams_stickies", "0", "Stickies", "Render chams on stickybombs");
static CatVar teammate_buildings(CV_SWITCH, "chams_teammate_buildings", "0", "Teammate Buildings", "Render chams on teammates buildings");
static CatVar weapons(CV_SWITCH, "chams_weapons", "1", "Weapons", "Render chams on players weapons");
static CatVar recursive(CV_SWITCH, "chams_recursive", "1", "Recursive", "Render chams on weapons and cosmetics");
static CatVar weapons_white(CV_SWITCH, "chams_weapons_white", "1", "White Weapons", "Should chams on weapons be white");
static CatVar legit(CV_SWITCH, "chams_legit", "0", "Legit chams", "Don't show chams through walls");
static CatVar singlepass(CV_SWITCH, "chams_singlepass", "0", "Single-pass", "Render chams only once (this disables 'darker' chams on invisible parts of player");
void EffectChams::Init() {
logging::Info("Init EffectChams...");
@ -102,12 +105,6 @@ bool EffectChams::ShouldRenderChams(IClientEntity* entity) {
if (entity->entindex() < 0) return false;
CachedEntity* ent = ENTITY(entity->entindex());
if (CE_BAD(ent)) return false;
if (weapons && vfunc<bool(*)(IClientEntity*)>(entity, 0xBE, 0)(entity)) {
IClientEntity* owner = vfunc<IClientEntity*(*)(IClientEntity*)>(entity, 0x1C3, 0)(entity);
if (owner) {
return ShouldRenderChams(owner);
}
}
switch (ent->m_Type) {
case ENTITY_BUILDING:
if (!buildings) return false;
@ -141,6 +138,35 @@ bool EffectChams::ShouldRenderChams(IClientEntity* entity) {
return false;
}
void EffectChams::RenderChamsRecursive(IClientEntity* entity) {
entity->DrawModel(1);
if (!recursive) return;
IClientEntity *attach;
int passes = 0;
attach = g_IEntityList->GetClientEntity(*(int*)((uintptr_t)entity + netvar.m_Collision - 24) & 0xFFF);
while (attach && passes++ < 32) {
if (attach->ShouldDraw()) {
if (entity->GetClientClass()->m_ClassID == RCC_PLAYER && vfunc<bool(*)(IClientEntity*)>(attach, 190, 0)(attach)) {
if (weapons_white) {
rgba_t mod_original;
g_IVRenderView->GetColorModulation(mod_original.rgba);
g_IVRenderView->SetColorModulation(colors::white);
attach->DrawModel(1);
g_IVRenderView->SetColorModulation(mod_original.rgba);
} else {
attach->DrawModel(1);
}
}
else
attach->DrawModel(1);
}
attach = g_IEntityList->GetClientEntity(*(int*)((uintptr_t)attach + netvar.m_Collision - 20) & 0xFFF);
}
}
void EffectChams::RenderChams(int idx) {
CMatRenderContextPtr ptr(GET_RENDER_CONTEXT);
IClientEntity* entity = g_IEntityList->GetClientEntity(idx);
@ -148,17 +174,22 @@ void EffectChams::RenderChams(int idx) {
if (ShouldRenderChams(entity)) {
rgba_t color = ChamsColor(entity);
rgba_t color_2 = color * 0.6f;
mat_unlit_z->AlphaModulate(1.0f);
ptr->DepthRange(0.0f, 0.01f);
g_IVRenderView->SetColorModulation(color);
g_IVModelRender->ForcedMaterialOverride(flat ? mat_unlit_z : mat_lit_z);
entity->DrawModel(1);
//((DrawModelExecute_t)(hooks::hkIVModelRender->GetMethod(hooks::offDrawModelExecute)))(_this, state, info, matrix);
mat_unlit->AlphaModulate(1.0f);
g_IVRenderView->SetColorModulation(color_2);
ptr->DepthRange(0.0f, 1.0f);
g_IVModelRender->ForcedMaterialOverride(flat ? mat_unlit : mat_lit);
entity->DrawModel(1);
if (!legit) {
mat_unlit_z->AlphaModulate(1.0f);
ptr->DepthRange(0.0f, 0.01f);
g_IVRenderView->SetColorModulation(color_2);
g_IVModelRender->ForcedMaterialOverride(flat ? mat_unlit_z : mat_lit_z);
RenderChamsRecursive(entity);
}
if (legit || !singlepass) {
mat_unlit->AlphaModulate(1.0f);
g_IVRenderView->SetColorModulation(color);
ptr->DepthRange(0.0f, 1.0f);
g_IVModelRender->ForcedMaterialOverride(flat ? mat_unlit : mat_lit);
RenderChamsRecursive(entity);
}
}
}
}

View File

@ -29,6 +29,7 @@ public:
void RenderChams(int idx);
void BeginRenderChams();
void EndRenderChams();
void RenderChamsRecursive(IClientEntity* entity);
public:
bool init { false };
bool drawing { false };

View File

@ -12,6 +12,74 @@
int CatVar::last_id { 0 };
int rebased_count { 0 };
int GetRebasedCatVarCount() {
return rebased_count;
}
static CatCommand cfg_rebase("cfg_setbase", "Rebase config", []() {
for (auto& cv : CatVarList()) {
std::string value(cv->GetString());
if (value != cv->defaults) {
cv->current_base = value;
rebased_count++;
}
}
logging::Info("Successfully rebased %d variables", rebased_count);
});
static CatCommand cfg_resetbase("cfg_resetbase", "Reset config base", []() {
for (auto& cv : CatVarList()) {
cv->current_base = cv->defaults;
}
rebased_count = 0;
});
static CatCommand save_settings("save", "Save settings (optional filename)", [](const CCommand& args) {
std::string filename("lastcfg");
if (args.ArgC() > 1) {
filename = std::string(args.Arg(1));
}
std::string path = format("tf/cfg/cat_", filename, ".cfg");
logging::Info("Saving settings to %s", path.c_str());
if (GetRebasedCatVarCount()) {
logging::Info("[Warning] %d CatVars are rebased!", GetRebasedCatVarCount());
}
std::ofstream file(path, std::ios::out);
if (file.bad()) {
logging::Info("Couldn't open the file!");
return;
}
for (const auto& i : CatVarList()) {
if (i->GetBase() != std::string(i->GetString())) {
file << CON_PREFIX << i->name << " \"" << i->GetString() << "\"\n";
}
}
file.close();
});
static CatCommand save_settings_complete("save_complete", "Save all settings (optional filename)", [](const CCommand& args) {
std::string filename("lastcfg");
if (args.ArgC() > 1) {
filename = std::string(args.Arg(1));
}
std::string path = format("tf/cfg/cat_", filename, ".cfg");
logging::Info("Saving settings to %s", path.c_str());
if (GetRebasedCatVarCount()) {
logging::Info("[Warning] %d CatVars are rebased!", GetRebasedCatVarCount());
}
std::ofstream file(path, std::ios::out);
if (file.bad()) {
logging::Info("Couldn't open the file!");
return;
}
for (const auto& i : CatVarList()) {
file << CON_PREFIX << i->name << " \"" << i->GetString() << "\"\n";
}
file.close();
});
// Prevent initialization errors.
std::vector<CatVar*>& registrationArray() {
static std::vector<CatVar*> vector;
@ -94,6 +162,7 @@ void CatVar::Register() {
id = last_id++;
convar = CreateConVar(CON_PREFIX + name, defaults, desc_short);
convar_parent = convar->m_pParent;
current_base = defaults;
while (!callbacks.empty()) {
callbacks.back()(this);
callbacks.pop_back();

View File

@ -94,6 +94,10 @@ public:
return g_IInputSystem->IsButtonDown(static_cast<ButtonCode_t>(static_cast<int>(*this)));
}
inline const std::string& GetBase() const {
return current_base;
}
public:
const CatVar_t type;
const std::string name;
@ -102,6 +106,8 @@ public:
const std::string desc_long { "" };
const CatEnum* const enum_type { nullptr };
std::string current_base { "0" };
bool restricted { false };
float min { 0.0f };
float max { 0.0f };
@ -121,5 +127,6 @@ std::vector<CatCommand*>& commandRegistrationArray();
std::vector<CatVar*>& CatVarList();
void RegisterCatVars();
int GetRebasedCatVarCount();
#endif /* CVWRAPPER_H_ */

View File

@ -79,6 +79,9 @@ void DrawCheatVisuals() {
PROF_SECTION(PT_spyalert);
SAFE_CALL(hacks::tf::spyalert::Draw());
}
#ifdef IPC_ENABLED
IF_GAME(IsTF()) SAFE_CALL(hacks::shared::followbot::Draw());
#endif
{
PROF_SECTION(DRAW_esp);
hacks::shared::esp::Draw();

View File

@ -14,11 +14,16 @@ int g_AppID = 0;
void ThirdpersonCallback(IConVar* var, const char* pOldValue, float flOldValue) {
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;
}
}
ConVar* sv_client_min_interp_ratio;
ConVar* cl_interp_ratio;
ConVar* cl_interp;
ConVar* cl_interpolate;
unsigned long tickcount = 0;
char* force_name_newlined = new char[32] { 0 };
bool need_name_change = true;
@ -38,6 +43,11 @@ CatVar disconnect_reason(CV_STRING, "disconnect_reason", "", "Disconnect reason"
CatVar event_log(CV_SWITCH, "events", "1", "Advanced Events");
void GlobalSettings::Init() {
sv_client_min_interp_ratio = g_ICvar->FindVar("sv_client_min_interp_ratio");
cl_interp_ratio = g_ICvar->FindVar("cl_interp_ratio");
cl_interp = g_ICvar->FindVar("cl_interp");
cl_interpolate = g_ICvar->FindVar("cl_interpolate");
bSendPackets = new bool;
*bSendPackets = true;
force_thirdperson.OnRegister([](CatVar* var) {

View File

@ -15,6 +15,11 @@ class CatVar;
extern int g_AppID;
extern unsigned long tickcount;
extern ConVar* sv_client_min_interp_ratio;
extern ConVar* cl_interp_ratio;
extern ConVar* cl_interp;
extern ConVar* cl_interpolate;
extern CatVar event_log;
extern CatVar cathook; // Master switch
extern CatVar ignore_taunting;

View File

@ -31,6 +31,7 @@ void CatVar_Integer(CatVar& var) {
int value = var;
ImGui::PushItemWidth(120.0f);
int step = var.restricted ? (var.max - var.min) / 50 : 1;
if (step == 0) step = 1;
if (ImGui::InputInt(label, &value, step, step * 20)) {
var = value;
}

View File

@ -7,6 +7,8 @@
#include "Schema.hpp"
#include "../../helpers.h"
#include "../../cvwrapper.h"
#include "../../logging.h"
@ -23,13 +25,12 @@ CatVar* FindCatVar(const std::string name) {
ListEntry_Dummy* FromJson(nlohmann::json json) {
if (json.is_string()) {
const std::string var_name = json;
logging::Info("[Debug] Variable: %s", var_name.c_str());
ListEntry_Dummy* cv;
try {
cv = (ListEntry_Dummy*)(new ListEntry_Variable(*FindCatVar(var_name)));
} catch (std::runtime_error& er) {
logging::Info("[Error] %s", er.what());
cv = (ListEntry_Dummy*)(new ListEntry_Label("malformed object"));
cv = (ListEntry_Dummy*)(new ListEntry_Label(format("[", var_name, "]")));
}
return cv;
} else if (json.is_object()) {
@ -129,7 +130,7 @@ CatCommand reloadscheme("reloadscheme", "Reload Scheme", []() {
}
for (const auto& v : CatVarList()) {
if (map_present.find(v) == map_present.end()) {
logging::Info("%s is not in any list!", v->name.c_str());
logging::Info("%s is not present in the GUI!", v->name.c_str());
}
}
//TraverseList(&main_list);

View File

@ -272,6 +272,7 @@ void hack::Initialize() {
hacks::shared::anticheat::Init();
hacks::tf2::healarrow::Init();
InitSpinner();
hacks::shared::spam::Init();
logging::Info("Initialized Fidget Spinner");
}

View File

@ -56,10 +56,12 @@ static CatVar wait_for_charge_bypass(CV_SWITCH, "aimbot_charge_if_full", "1", "S
static CatVar ignore_vaccinator(CV_SWITCH, "aimbot_ignore_vaccinator", "1", "Ignore Vaccinator", "Hitscan weapons won't fire if enemy is vaccinated against bullets");
static CatVar ignore_hoovy(CV_SWITCH, "aimbot_ignore_hoovy", "0", "Ignore Hoovies", "Aimbot won't attack hoovies");
static CatVar ignore_cloak(CV_SWITCH, "aimbot_ignore_cloak", "1", "Ignore cloaked", "Don't aim at invisible enemies");
static CatVar ignore_deadringer(CV_SWITCH, "aimbot_ignore_deadringer", "1", "Ignore deadringer", "Don't aim at deadringed enemies");
static CatVar buildings_sentry(CV_SWITCH, "aimbot_buildings_sentry", "1", "Aim Sentry", "Should aimbot aim at sentryguns?");
static CatVar buildings_other(CV_SWITCH, "aimbot_buildings_other", "1", "Aim Other building", "Should aimbot aim at other buildings");
static CatVar stickybot(CV_SWITCH, "aimbot_stickys", "0", "Aim Sticky", "Should aimbot aim at stickys");
static CatVar teammates(CV_SWITCH, "aimbot_teammates", "0", "Aim at teammates", "Aim at your own team. Useful for HL2DM");
static CatEnum teammates_enum({ "ENEMY ONLY", "TEAMMATE ONLY", "BOTH" });
static CatVar teammates(teammates_enum, "aimbot_teammates", "0", "Aim at teammates", "Use to choose which team/s to target");
static CatVar silent(CV_SWITCH, "aimbot_silent", "1", "Silent", "Your screen doesn't get snapped to the point where aimbot aims at");
static CatVar target_lock(CV_SWITCH, "aimbot_target_lock", "0", "Target Lock", "Keeps your previously chosen target untill target check fails");
static CatEnum hitbox_enum({
@ -93,10 +95,14 @@ static CatVar huntsman_full_auto(CV_SWITCH, "aimbot_full_auto_huntsman", "1", "A
// Debug vars
static CatVar aimbot_debug(CV_SWITCH, "aimbot_debug", "0", "Aimbot Debug", "Display simple debug info for aimbot");
static CatVar engine_projpred(CV_SWITCH, "debug_aimbot_engine_pp", "0", "Engine ProjPred");
/* TODO IMPLEMENT
// Followbot vars
static CatVar auto_spin_up(CV_SWITCH, "aimbot_spin_up", "0", "Auto Spin Up", "Spin up minigun if you can see target, useful for followbots");
static CatVar auto_zoom(CV_SWITCH, "aimbot_auto_zoom", "0", "Auto Zoom", "Automatically zoom in if you can see target, useful for followbots");
*/
static CatVar fovcircle_opacity(CV_FLOAT, "aimbot_fov_draw_opacity", "0.7", "FOV Circle Opacity", "Defines opacity of FOV circle", 0.0f, 1.0f);
static CatVar rageonly(CV_SWITCH, "aimbot_rage_only", "0", "Ignore non-rage targets", "Use playerlist to set up rage targets");
static CatVar miss_chance(CV_FLOAT, "aimbot_miss_chance", "0", "Miss chance", "From 0 to 1. Aimbot will NOT aim in these % cases", 0.0f, 1.0f);
// Current Entity
int target_eid { 0 };
@ -116,16 +122,12 @@ bool silent_huntsman { false };
AimbotCalculatedData_s calculated_data_array[2048] {};
// The main "loop" of the aimbot.
// The main "loop" of the aimbot.
// The main "loop" of the aimbot.
void CreateMove() {
// Check if aimbot is enabled
if (!enabled) return;
// Save should aim info
bool shouldAim = ShouldAim();
bool aimkeyStatus = UpdateAimkey();
// Refresh projectile info
int huntsman_ticks = 0;
projectile_mode = (GetProjectileData(g_pLocalPlayer->weapon(), cur_proj_speed, cur_proj_grav));
@ -142,23 +144,27 @@ void CreateMove() {
huntsman_ticks = max(0, huntsman_ticks - 1);
}
// Save should aim info
// We do this as we need to pass whether the aimkey allows aiming to both the find target and aiming system. If we just call the func than toggle aimkey would break so we save it to a var to use it twice
bool aimkey_status = UpdateAimkey();
// Refresh our best target
CachedEntity* target = RetrieveBestTarget(aimkeyStatus);
CachedEntity* target = RetrieveBestTarget(aimkey_status);
// Check target for dormancy and if there even is a target at all
if (CE_GOOD(target) && foundTarget) {
// Set target esp color to pink
hacks::shared::esp::SetEntityColor(target, colors::pink);
// Check if player can aim and if aimkey allows aiming
// We also preform a CanShoot check here per the old canshoot method
if (shouldAim && aimkeyStatus && GetCanAim(1)) {
if (ShouldAim() && aimkey_status && GetCanAim(1)) {
// Check if player isnt using a huntsman
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFCompoundBow)) {
// If settings allow, limit aiming to only when can shoot
// We do this here only if wip is true as we do the check elsewhere for legacy
// We check if we need to do a canshoot check as we might want to shoot but not aim, so do that check here
if (GetCanAim(2)) {
// Check the flNextPrimaryAttack netvar to tell when to aim
if (CanShoot()) Aim(target);
@ -220,6 +226,7 @@ bool ShouldAim() {
if (g_pUserCmd->buttons & IN_USE) return false;
// Check if using action slot item
if (g_pLocalPlayer->using_action_slot_item) return false;
IF_GAME (IsTF2()) {
// Check if Carrying A building
if (CE_BYTE(g_pLocalPlayer->entity, netvar.m_bCarryingObject)) return false;
@ -252,6 +259,7 @@ bool ShouldAim() {
return false;
};
}
IF_GAME (IsTF()) {
// Check if player is zooming
if (g_pLocalPlayer->bZoomed) {
@ -259,8 +267,19 @@ bool ShouldAim() {
if (!CanHeadshot()) return false;
}
}
}
IF_GAME (IsTF()) {
// Minigun spun up handler
if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFMinigun)) {
int weapon_state = CE_INT(g_pLocalPlayer->weapon(), netvar.iWeaponState);
// If user setting for autospin isnt true, then we check if minigun is already zoomed
if ((weapon_state == MinigunState_t::AC_STATE_IDLE || weapon_state == MinigunState_t::AC_STATE_STARTFIRING) && !auto_spin_up) {
return false;
}
if (!(g_pUserCmd->buttons & (IN_ATTACK2 | IN_ATTACK))) {
return false;
}
}
// Check if crithack allows attacking
if (!AllowAttacking())
return false;
@ -341,19 +360,40 @@ bool IsTargetStateGood(CachedEntity* entity) {
// Dont aim at dead player
if (!entity->m_bAlivePlayer) return false;
// Dont aim at teammates
if (!entity->m_bEnemy && !teammates) return false;
if ((int)teammates != 2 && ((!entity->m_bEnemy && !teammates) || (entity->m_bEnemy && teammates))) return false;
// Check if player is too far away
if (EffectiveTargetingRange()) {
if (entity->m_flDistance > EffectiveTargetingRange()) return false;
}
if (rageonly) {
if (playerlist::AccessData(entity).state != playerlist::k_EState::RAGE) {
return false;
}
}
IF_GAME (IsTF()) {
// If settings allow waiting for charge, and current charge cant kill target, dont aim unless at 100% and the player wants to fire at 100% anyways
if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) {
if (!wait_for_charge_bypass || (wait_for_charge_bypass && g_pLocalPlayer->flZoomBegin <= 1.0f)) {
float bdmg = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flChargedDamage);
if (g_GlobalVars->curtime - g_pLocalPlayer->flZoomBegin <= 1.0f) bdmg = 50.0f;
if ((bdmg * 3) < (HasDarwins(entity) ? (entity->m_iHealth * 1.15) : entity->m_iHealth)) {
return false;
// Grab netvar for current charge damage and multiply by 3 for headshot
float cdmg = CE_FLOAT(LOCAL_W, netvar.flChargedDamage) * 3;
if (!(cdmg == 450.0f && wait_for_charge_bypass)) {
// Darwins damage correction, Darwins protects against 15% of damage
if (HasDarwins(entity))
cdmg = (cdmg * .85) - 1;
// Vaccinator damage correction, Vac charge protects against 75% of damage
if (HasCondition<TFCond_UberBulletResist>(entity)) {
cdmg = (cdmg * .25) - 1;
// Passive bullet resist protects against 10% of damage
} else if (HasCondition<TFCond_SmallBulletResist>(entity)) {
cdmg = (cdmg * .90) - 1;
}
// Invis damage correction, Invis spies get protection from 10% of damage
if (IsPlayerInvisible(entity))
cdmg = (cdmg * .80) - 1;
// Check if player will die from headshot or if target has more health than normal overheal allows.
if ( !(entity->m_iHealth <= 150 || entity->m_iHealth <= cdmg || !g_pLocalPlayer->bZoomed || entity->m_iHealth > entity->m_iMaxHealth + (entity->m_iMaxHealth * 0.5)) ) {
return false;
}
}
}
@ -361,8 +401,18 @@ bool IsTargetStateGood(CachedEntity* entity) {
if (ignore_taunting && HasCondition<TFCond_Taunting>(entity)) return false;
// Dont target invulnerable players, ex: uber, bonk
if (IsPlayerInvulnerable(entity)) return false;
// If settings allow, dont target cloaked players
if (ignore_cloak && IsPlayerInvisible(entity)) return false;
// Checks for cloaked/deadringed players
if (ignore_cloak || ignore_deadringer) {
if (IsPlayerInvisible(entity)) {
// Determine whether cloaked player is using deadringer and checks user settings accordingly
// Item id for deadringer is 59 as of time of creation
if (HasWeapon(entity, 59)) {
if (ignore_deadringer) return false;
} else {
if (ignore_cloak) return false;
}
}
}
// If settings allow, dont target vaccinated players
if (g_pLocalPlayer->weapon_mode == weaponmode::weapon_hitscan || LOCAL_W->m_iClassID == CL_CLASS(CTFCompoundBow))
if (ignore_vaccinator && HasCondition<TFCond_UberBulletResist>(entity)) return false;
@ -429,6 +479,9 @@ bool IsTargetStateGood(CachedEntity* entity) {
// Check if sticky aimbot is enabled
if (!stickybot) return false;
// Only hitscan weapons can break stickys so check for them.
if (!(GetWeaponMode() == weapon_hitscan || GetWeaponMode() == weapon_melee)) return false;
// Check if target is within range
if (EffectiveTargetingRange()) {
if (entity->m_flDistance > (int)EffectiveTargetingRange()) return false;
@ -462,6 +515,12 @@ bool IsTargetStateGood(CachedEntity* entity) {
// A function to aim at a specific entitiy
void Aim(CachedEntity* entity) {
if (float(miss_chance) > 0.0f) {
if ((rand() % 100) < float(miss_chance) * 100.0f) {
return;
}
}
// Dont aim at a bad entity
if (CE_BAD(entity)) return;
@ -472,6 +531,7 @@ void Aim(CachedEntity* entity) {
// Grab the targets vector, and vector it for the eye angles
tr = (PredictEntity(entity) - g_pLocalPlayer->v_Eye);
VectorAngles(tr, angles);
// Clamp angles
fClampAngle(angles);
@ -487,8 +547,10 @@ void Aim(CachedEntity* entity) {
// A function to check whether player can autoshoot
bool CanAutoShoot() {
// First check whether user settings allow autoshoot
if (autoshoot) {
// A var for weapons not to use with autoshoot
static int forbiddenWeapons[] = { CL_CLASS(CTFCompoundBow), CL_CLASS(CTFKnife) };
int weapon_class;
@ -503,9 +565,20 @@ bool CanAutoShoot() {
}
}
// Check if zoomed, and zoom if not, then zoom
IF_GAME (IsTF()) {
if (g_pLocalPlayer->clazz == tf_class::tf_sniper) {
if (g_pLocalPlayer->holding_sniper_rifle) {
if (auto_zoom && !HasCondition<TFCond_Zoomed>(LOCAL_E)) {
g_pUserCmd->buttons |= IN_ATTACK2;
attack = false;
}
}
}
}
// Check if ambassador can headshot
IF_GAME (IsTF2()) {
// Check if players current weapon is an ambasador
if (IsAmbassador(g_pLocalPlayer->weapon())) {
// Check if ambasador can headshot
if (!AmbassadorCanHeadshot()) return false;
@ -593,7 +666,10 @@ int BestHitbox(CachedEntity* target) {
headonly = true;
// If player is using an ambassador, set headonly to true
} else if (IsAmbassador(g_pLocalPlayer->weapon())) {
headonly = true;
// We only want to aim for the head if the ambassador can headshot
headonly = AmbassadorCanHeadshot();
// 18 health is a good number to use as thats the usual minimum damage it can do with a bodyshot, but damage could potentially be higher
if (target->m_iHealth <= 18) headonly = false;
// If player is using a rocket based weapon, prefer the hip
} else if (ci == CL_CLASS(CTFRocketLauncher) ||
ci == CL_CLASS(CTFRocketLauncher_AirStrike) ||
@ -896,7 +972,7 @@ void Reset() {
}
// Function called when we need to draw to screen
static CatVar fov_draw(CV_SWITCH, "aimbot_fov_draw", "0", "Draw Fov Ring", "Draws a ring to represent your current aimbot fov\nDoesnt change according to zoom fov\nWIP");
static CatVar fov_draw(CV_SWITCH, "aimbot_fov_draw", "0", "Draw Fov Ring", "Draws a ring to represent your current aimbot fov");
void DrawText() {
// Dont draw to screen when aimbot is disabled
if (!enabled) return;
@ -906,19 +982,22 @@ void DrawText() {
// Broken from kathook merge, TODO needs to be adapted for imgui
if (fov_draw) {
// It cant use fovs greater than 180, so we check for that
if (fov && float(fov) < 180) {
if (float(fov) > 0.0f && float(fov) < 180) {
// Dont show ring while player is dead
if (LOCAL_E->m_bAlivePlayer) {
rgba_t color = GUIColor();
color.a = float(fovcircle_opacity);
// Grab the screen resolution and save to some vars
int width, height;
g_IEngine->GetScreenSize(width, height);
// Some math to find radius of the fov circle
// float radius = tanf(DEG2RAD((float)fov) / 2) / tanf(DEG2RAD(draw::fov) / 2) * width;
float mon_fov = (float(width) / float(height) / (4.0f / 3.0f));
float fov_real = RAD2DEG(2 * atanf(mon_fov * tanf(DEG2RAD(draw::fov / 2))));
float radius = tan(DEG2RAD(float(fov)) / 2) / tan(DEG2RAD(fov_real) / 2) * (width);
// Draw a circle with our newfound circle
float px = 0;
float py = 0;
@ -932,7 +1011,7 @@ void DrawText() {
px = width / 2 + radius * cos(ang);
py = height / 2 + radius * sin(ang);
}
drawgl::Line(px, py, x - px, y - py, GUIColor());
drawgl::Line(px, py, x - px, y - py, color);
px = x;
py = y;
}
@ -955,9 +1034,4 @@ void DrawText() {
}
}}}
}}}

View File

@ -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 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 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");
// TODO setup proj sorting
// TODO CatVar big_proj(CV_SWITCH, "reflect_big_projectile", "0", "Reflect big projectiles", "Reflect Rockets");
@ -29,9 +29,14 @@ CatVar stickies(CV_SWITCH, "reflect_stickybombs", "0", "Reflect stickies", "Refl
void CreateMove() {
// Check if user settings allow Auto Reflect
if (!enabled) return;
if (blastkey && !blastkey.KeyDown()) return;
// Check if player is using a flame thrower
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlameThrower)) return;
// Check for phlogistinator, which is item 594
if (HasWeapon(LOCAL_E, 594)) return;
// If user settings allow, return if local player is in attack
if (idle_only && (g_pUserCmd->buttons & IN_ATTACK)) return;

View File

@ -77,11 +77,14 @@ void CreateMove() {
// Check user settings if auto-sticky is enabled
if (!enabled) return;
// Check if game is a tf game
//IF_GAME (!IsTF()) return;
// Check if player is demoman
if (g_pLocalPlayer->clazz != tf_demoman) return;
// Check for sticky jumper, which is item 265, if true, return
if (HasWeapon(LOCAL_E, 265));
if (HasWeapon(LOCAL_E, 265)) return;
// Clear the arrays
bombs.clear();

View File

@ -13,6 +13,8 @@
namespace hacks { namespace shared { namespace esp {
CatVar show_weapon(CV_SWITCH, "esp_weapon", "1", "Show weapon name", "Show which weapon does the enemy use");
CatEnum tracers_enum({ "OFF", "CENTER", "BOTTOM" });
CatVar tracers(tracers_enum, "esp_tracers", "0", "Tracers", "SDraws a line from the player to a position on your screen");
CatVar local_esp(CV_SWITCH, "esp_local", "1", "ESP Local Player", "Shows local player ESP in thirdperson");
CatVar buildings(CV_SWITCH, "esp_buildings", "1", "Building ESP", "Show buildings");
CatVar enabled(CV_SWITCH, "esp_enabled", "0", "ESP", "Master ESP switch");
@ -399,6 +401,7 @@ void _FASTCALL ProcessEntity(CachedEntity* ent) {
// only if bTeammatePowerup or bTeammates is true
if (legit && ent->m_iTeam != g_pLocalPlayer->team && playerlist::IsDefault(info.friendsID)) {
if (IsPlayerInvisible(ent)) return;
if (vischeck && !ent->IsVisible()) return;
/*if (ent->m_lLastSeen > (unsigned)v_iLegitSeenTicks->GetInt()) {
return;
}*/
@ -650,6 +653,25 @@ void _FASTCALL ProcessEntityPT(CachedEntity* ent) {
}
}
if (tracers && ent->m_Type == ENTITY_PLAYER) {
// Grab the screen resolution and save to some vars
int width, height;
g_IEngine->GetScreenSize(width, height);
// Center values on screen
width = width / 2;
// Only center height if we are using center mode
if ((int)tracers == 1) height = height / 2;
// Get world to screen
Vector scn;
draw::WorldToScreen(ent->m_vecOrigin, scn);
// Draw a line
drawgl::Line(scn.x, scn.y, width - scn.x, height - scn.y, fg);
}
if (ent->m_Type == ENTITY_PLAYER) {
if (joy_esp) {
auto hb = ent->hitboxes.GetHitbox(0);

File diff suppressed because it is too large Load Diff

View File

@ -18,19 +18,32 @@ class CachedEntity;
namespace hacks { namespace shared { namespace followbot {
extern CatCommand move_to_crosshair;
extern CatCommand follow;
extern CatCommand follow_entity;
enum class EFollowType {
VECTOR, // When we need to goto a vector
ENTITY // when we dont have a specific steamid, but we still want to follow an entity
};
//extern CatCommand move_to_crosshair;
//extern CatCommand follow;
//extern CatCommand follow_entity;
extern CatVar bot;
extern unsigned follow_steamid;
extern int following_idx;
bool IsBot(CachedEntity* entity);
void DoWalking();
void PrintDebug();
void AddMessageHandlers(ipc::peer_t* peer);
void AfterCreateMove();
void Draw();
void CrumbReset();
void CrumbTopAdd(Vector crumbToAdd);
void CrumbBottomAdd();
void DoWalking();
void DrawFollowbot();
std::pair<float, float> ComputeMove(const Vector& a, const Vector& b);
void WalkTo(const Vector& vector);
unsigned MakeMask();
void SelectEntity(int idx);
}}}

View File

@ -82,6 +82,9 @@ void Reload() {
void Init() {
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() {

View File

@ -12,7 +12,7 @@ namespace hacks { namespace shared { namespace lagexploit {
CatVar toggle(CV_SWITCH, "removecond_toggle", "0", "Toggle Lag Exploit", "Toggle lag exploit (RemoveCond)");
CatVar key(CV_KEY, "removecond_key", "0", "RemoveCond Key");
CatVar lagMasterSwitch(CV_SWITCH, "removecond_master", "1", "Master Lag Exploit Switch", "Master switch for the lag exploit\nDisabling this disables everything else that uses remove conds");
CatVar lagValue(CV_INT, "removecond_value", "450", "RemoveCond Value", "Value of user cmds to spam with");
CatVar lagValue(CV_INT, "removecond_value", "900", "RemoveCond Value", "Value of user cmds to spam with");
CatCommand do_lagexploit("removecond", "RemoveCond (for use in scripts)", []() {
AddExploitTicks(6);
@ -128,43 +128,6 @@ void CreateMove() {
}
}
}
// Infinite pickups (health and ammo)
if (infinite_packs && CE_GOOD(LOCAL_E)) {
ICollideable* p = RAW_ENT(LOCAL_E)->GetCollideable();
const Vector& max1 = p->OBBMaxs();
const Vector& min1 = p->OBBMins();
for (int i = 1; i < entity_cache::max; i++) {
CachedEntity* e = ENTITY(i);
// CE_BAD is used to prevent removeconding on empty spaces where the item hasn't respawned
// Distance check so removecond activates before collision with the pickup
if (CE_BAD(e) || e->m_iClassID != CL_CLASS(CBaseAnimating) || e->m_flDistance > 66.0f) {
continue;
}
// Lag for health
if (LOCAL_E->m_iHealth < LOCAL_E->m_iMaxHealth && (e->m_ItemType == ITEM_HEALTH_SMALL || e->m_ItemType == ITEM_HEALTH_MEDIUM || e->m_ItemType == ITEM_HEALTH_LARGE) ) {
AddExploitTicks(3);
}
// Lag for ammo / metal
// TODO: Alternative to - LOCAL_E->m_iAmmo < LOCAL_E->m_iMaxAmmo
// That is pseudocode but checking each weapon for ammo + engie for metal would be ideal
if ((e->m_ItemType == ITEM_AMMO_SMALL || e->m_ItemType == ITEM_AMMO_MEDIUM || e->m_ItemType == ITEM_AMMO_LARGE) ) {
AddExploitTicks(3);
}
// Not working for some reason?
/*ICollideable* c = RAW_ENT(e)->GetCollideable();
const Vector& max2 = c->OBBMaxs();
const Vector& min2 = c->OBBMins();
if ( (min1.x <= max2.x && max1.x >= min2.x) &&
(min1.y <= max2.y && max1.y >= min2.y) &&
(min1.z <= max2.z && max1.z >= min2.z) ) {
logging::Info("Collision with %d", i);
amount = 900;
break;
}*/
}
}
}
// More paste from kathook
if (g_pUserCmd->buttons & (IN_ATTACK | IN_ATTACK2)) {
@ -185,6 +148,29 @@ void CreateMove() {
}
// Infinite healthpacks (I'll probably have to move this somewhere else)
if (infinite_packs && CE_GOOD(LOCAL_E) && LOCAL_E->m_iHealth < LOCAL_E->m_iMaxHealth) {
ICollideable* p = RAW_ENT(LOCAL_E)->GetCollideable();
const Vector& max1 = p->OBBMaxs() + RAW_ENT(LOCAL_E)->GetAbsOrigin();
const Vector& min1 = p->OBBMins() + RAW_ENT(LOCAL_E)->GetAbsOrigin();
for (int i = 1; i < entity_cache::max; i++) {
CachedEntity* e = ENTITY(i);
if (CE_BAD(e)) continue;
if (e->m_iClassID != CL_CLASS(CBaseAnimating)) continue;
if (e->m_ItemType != ITEM_HEALTH_SMALL && e->m_ItemType != ITEM_HEALTH_MEDIUM && e->m_ItemType != ITEM_HEALTH_LARGE) continue;
ICollideable* c = RAW_ENT(e)->GetCollideable();
const Vector& max2 = c->OBBMaxs() + e->m_vecOrigin;// + Vector(10, 10, 10);
const Vector& min2 = c->OBBMins() + e->m_vecOrigin;// - Vector(10, 10, 10);
if ( (min1.x <= max2.x && max1.x >= min2.x) &&
(min1.y <= max2.y && max1.y >= min2.y) &&
(min1.z <= max2.z && max1.z >= min2.z) ) {
//logging::Info("Collision with %d", i);
amount = 900;
break;
}
}
}
if (!amount) return;
// Modifying command_number and lastoutgoingcommand turned out to be useless

View File

@ -485,27 +485,6 @@ CatCommand name("name_set", "Immediate name change", [](const CCommand& args) {
ch->SendNetMsg(setname, false);
}
});
CatCommand save_settings("save", "Save settings (optional filename)", [](const CCommand& args) {
std::string filename("lastcfg");
if (args.ArgC() > 1) {
filename = std::string(args.Arg(1));
}
std::string path = format("tf/cfg/cat_", filename, ".cfg");
logging::Info("Saving settings to %s", path.c_str());
std::ofstream file(path, std::ios::out);
if (file.bad()) {
logging::Info("Couldn't open the file!");
return;
}
for (const auto& i : RegisteredVarsList()) {
if (i) {
if (strcmp(i->GetString(), i->GetDefault())) {
file << i->GetName() << " \"" << i->GetString() << "\"\n";
}
}
}
file.close();
});
CatCommand say_lines("say_lines", "Say with newlines (\\n)", [](const CCommand& args) {
std::string message(args.ArgS());
ReplaceString(message, "\\n", "\n");

View File

@ -14,8 +14,13 @@ static CatEnum spam_enum({"DISABLED", "CUSTOM", "DEFAULT", "LENNYFACES", "BLANKS
CatVar spam_source(spam_enum, "spam", "0", "Chat Spam", "Defines source of spam lines. CUSTOM spam file must be set in cat_spam_file and loaded with cat_spam_reload (Use console!)");
CatVar random_order(CV_SWITCH, "spam_random", "0", "Random Order");
CatVar filename(CV_STRING, "spam_file", "spam.txt", "Spam file", "Spam file name. Each line should be no longer than 100 characters, file must be located in cathook data folder");
CatVar teamname_spam(CV_SWITCH, "spam_teamname", "0", "Teamname Spam", "Spam changes the tournament name");
CatCommand reload("spam_reload", "Reload spam file", Reload);
static CatEnum voicecommand_enum({"DISABLED", "RANDOM", "MEDIC", "THANKS", "NICE SHOT", "CHEERS", "JEERS"});
CatVar voicecommand_spam(voicecommand_enum, "spam_voicecommand", "0", "Voice Command Spam", "Spams tf voice commands");
CatVar teamname_spam(CV_SWITCH, "spam_teamname", "0", "Teamname Spam", "Spam changes the tournament name");
bool teamname_swap = false;
int current_index { 0 };
@ -24,6 +29,8 @@ TextFile file {};
const std::string teams[] = { "RED", "BLU" };
// FUCK enum class.
// It doesn't have bitwise operators by default!! WTF!! static_cast<int>(REEE)!
@ -137,6 +144,12 @@ int QueryPlayer(Query query) {
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) {
size_t index = input.find("%query:");
while (index != std::string::npos) {
@ -166,15 +179,46 @@ bool FormatSpamMessage(std::string& message) {
}
void CreateMove() {
if (teamname_spam) {
if (teamname_swap) {
teamname_swap = false;
g_IEngine->ServerCmd("tournament_teamname Cat");
} else {
teamname_swap = true;
g_IEngine->ServerCmd("tournament_teamname Hook");
}
IF_GAME (IsTF2()) {
// Spam changes the tournament name in casual and compeditive gamemodes
if (teamname_spam) {
if (teamname_swap) {
teamname_swap = false;
g_IEngine->ServerCmd("tournament_teamname Cat");
} else {
teamname_swap = true;
g_IEngine->ServerCmd("tournament_teamname Hook");
}
}
if (voicecommand_spam) {
static float last_voice_spam = 0.0f;
if (g_GlobalVars->curtime - 4.0F > last_voice_spam) {
switch ((int)voicecommand_spam) {
case 1: // RANDOM
g_IEngine->ServerCmd(format("voicemenu ", floor(RandFloatRange(0, 2.9)), " ", floor(RandFloatRange(0, 8.9))).c_str());
break;
case 2: // MEDIC
g_IEngine->ServerCmd("voicemenu 0 0");
break;
case 3: // THANKS
g_IEngine->ServerCmd("voicemenu 0 1");
break;
case 4: // NICE SHOT
g_IEngine->ServerCmd("voicemenu 2 6");
break;
case 5: // CHEERS
g_IEngine->ServerCmd("voicemenu 2 2");
break;
case 6: // JEERS
g_IEngine->ServerCmd("voicemenu 2 3");
}
last_voice_spam = g_GlobalVars->curtime;
}
}
}
if (!spam_source) return;
static int safety_ticks = 0;
static int last_spam = 0;

View File

@ -25,6 +25,7 @@ extern CatVar enabled;
extern CatVar filename;
extern CatCommand reload;
void Init();
void CreateMove();
void Reset();
void Reload();

View File

@ -35,7 +35,7 @@ void Draw() {
closest_spy_distance = 0.0f;
spy_count = 0;
if (last_say > g_GlobalVars->curtime) last_say = 0;
for (int i = 0; i < HIGHEST_ENTITY && i < 64; i++) {
for (int i = 0; i < HIGHEST_ENTITY && i < 32; i++) {
ent = ENTITY(i);
if (CE_BAD(ent)) continue;
if (CE_BYTE(ent, netvar.iLifeState)) continue;

View File

@ -26,6 +26,8 @@ static CatVar trigger_key_mode(trigger_key_modes_enum, "trigger_key_mode", "1",
static CatEnum hitbox_mode_enum({ "AUTO-HEAD", "AUTO-CLOSEST", "Head only" });
static CatVar hitbox_mode(hitbox_mode_enum, "trigger_hitboxmode", "0", "Hitbox Mode", "Defines hitbox selection mode");
static CatVar accuracy(CV_INT, "trigger_accuracy", "1", "Improve accuracy", "Improves triggerbot accuracy when aiming for specific hitbox. Recommended to use with sniper rifle/ambassador");
static CatVar ignore_vaccinator(CV_SWITCH, "trigger_ignore_vaccinator", "1", "Ignore Vaccinator", "Hitscan weapons won't fire if enemy is vaccinated against bullets");
static CatVar ignore_hoovy(CV_SWITCH, "trigger_ignore_hoovy", "1", "Ignore Hoovies", "Triggerbot won't attack hoovies");
@ -40,12 +42,20 @@ static CatVar zoomed_only(CV_SWITCH, "trigger_zoomed", "1", "Zoomed only", "Don'
static CatVar max_range(CV_INT, "trigger_maxrange", "0", "Max distance",
"Max range for triggerbot\n"
"900-1100 range is efficient for scout/widowmaker engineer", 4096.0f);
static CatVar delay(CV_FLOAT, "trigger_delay", "0", "Delay", "Triggerbot delay in seconds", 0.0f, 1.0f);
float target_time = 0.0f;
int last_hb_traced = 0;
Vector forward;
// The main "loop" of the triggerbot
void CreateMove() {
float backup_time = target_time;
target_time = 0;
// Check if aimbot is enabled
if (!enabled) return;
@ -62,7 +72,23 @@ void CreateMove() {
if (CE_BAD(ent)) return;
// Determine whether the triggerbot should shoot, then act accordingly
if (IsTargetStateGood(ent)) g_pUserCmd->buttons |= IN_ATTACK;
if (IsTargetStateGood(ent)) {
target_time = backup_time;
if (delay) {
if (target_time > g_GlobalVars->curtime) {
target_time = 0.0f;
}
if (!target_time) {
target_time = g_GlobalVars->curtime;
} else {
if (g_GlobalVars->curtime - float(delay) >= target_time) {
g_pUserCmd->buttons |= IN_ATTACK;
}
}
} else {
g_pUserCmd->buttons |= IN_ATTACK;
}
}
return;
}
@ -92,6 +118,11 @@ bool ShouldShoot() {
if (HasCondition<TFCond_Taunting>(g_pLocalPlayer->entity)) return false;
// Check if player is cloaked
if (IsPlayerInvisible(g_pLocalPlayer->entity)) return false;
if (IsAmbassador(g_pLocalPlayer->weapon())) {
// Check if ambasador can headshot
if (!AmbassadorCanHeadshot()) return false;
}
}
IF_GAME (IsTF2()) {
@ -170,6 +201,35 @@ bool IsTargetStateGood(CachedEntity* entity) {
if (last_hb_traced != hitbox_t::head) return false;
}
// If usersettings tell us to use accuracy improvements and the cached hitbox isnt null, then we check if it hits here
if (accuracy) {
// Get a cached hitbox for the one traced
hitbox_cache::CachedHitbox* hb = entity->hitboxes.GetHitbox(last_hb_traced);
// Check for null
if (hb) {
// Get the min and max for the hitbox
Vector minz(min(hb->min.x, hb->max.x), min(hb->min.y, hb->max.y), min(hb->min.z, hb->max.z));
Vector maxz(max(hb->min.x, hb->max.x), max(hb->min.y, hb->max.y), max(hb->min.z, hb->max.z));
// Shrink the hitbox here
Vector size = maxz - minz;
Vector smod = size * 0.05f * (int)accuracy;
// Save the changes to the vectors
minz += smod;
maxz -= smod;
// Trace and test if it hits the smaller hitbox, if it fails we return false
Vector hit;
if (!CheckLineBox(minz, maxz, g_pLocalPlayer->v_Eye, forward, hit)) {
return false;
}
}
}
// Target passed the tests so return true
return true;
@ -219,6 +279,7 @@ bool IsTargetStateGood(CachedEntity* entity) {
// A function to return a potential entity in front of the player
CachedEntity* FindEntInSight(float range) {
// We dont want to hit ourself so we set an ignore
trace_t trace;
trace::filter_default.SetSelf(RAW_ENT(g_pLocalPlayer->entity));
@ -226,7 +287,6 @@ CachedEntity* FindEntInSight(float range) {
// Use math to get a vector in front of the player
float sp, sy, cp, cy;
QAngle angle;
Vector forward;
g_IEngine->GetViewAngles(angle);
sy = sinf(DEG2RAD(angle[1]));
cy = cosf(DEG2RAD(angle[1]));
@ -246,6 +306,7 @@ CachedEntity* FindEntInSight(float range) {
// Return an ent if that is what we hit
if (trace.m_pEnt) {
last_hb_traced = trace.hitbox;
return ENTITY(((IClientEntity*)trace.m_pEnt)->entindex());
}
@ -384,6 +445,49 @@ float EffectiveTargetingRange() {
}
}
// Helper functions to trace for hitboxes
// TEMPORARY CODE.
// TODO
bool GetIntersection(float fDst1, float fDst2, Vector P1, Vector P2, Vector& Hit) {
if ((fDst1 * fDst2) >= 0.0f) return false;
if (fDst1 == fDst2) return false;
Hit = P1 + (P2 - P1) * (-fDst1 / (fDst2 - fDst1));
return true;
}
bool InBox(Vector Hit, Vector B1, Vector B2, int Axis) {
if (Axis == 1 && Hit.z > B1.z && Hit.z < B2.z && Hit.y > B1.y && Hit.y < B2.y) return true;
if (Axis == 2 && Hit.z > B1.z && Hit.z < B2.z && Hit.x > B1.x && Hit.x < B2.x) return true;
if (Axis == 3 && Hit.x > B1.x && Hit.x < B2.x && Hit.y > B1.y && Hit.y < B2.y) return true;
return false;
}
bool CheckLineBox(Vector B1, Vector B2, Vector L1, Vector L2, Vector& Hit) {
if (L2.x < B1.x && L1.x < B1.x) return false;
if (L2.x > B2.x && L1.x > B2.x) return false;
if (L2.y < B1.y && L1.y < B1.y) return false;
if (L2.y > B2.y && L1.y > B2.y) return false;
if (L2.z < B1.z && L1.z < B1.z) return false;
if (L2.z > B2.z && L1.z > B2.z) return false;
if (L1.x > B1.x && L1.x < B2.x &&
L1.y > B1.y && L1.y < B2.y &&
L1.z > B1.z && L1.z < B2.z)
{
Hit = L1;
return true;
}
if ((GetIntersection(L1.x - B1.x, L2.x - B1.x, L1, L2, Hit) && InBox(Hit, B1, B2, 1))
|| (GetIntersection(L1.y - B1.y, L2.y - B1.y, L1, L2, Hit) && InBox(Hit, B1, B2, 2))
|| (GetIntersection(L1.z - B1.z, L2.z - B1.z, L1, L2, Hit) && InBox(Hit, B1, B2, 3))
|| (GetIntersection(L1.x - B2.x, L2.x - B2.x, L1, L2, Hit) && InBox(Hit, B1, B2, 1))
|| (GetIntersection(L1.y - B2.y, L2.y - B2.y, L1, L2, Hit) && InBox(Hit, B1, B2, 2))
|| (GetIntersection(L1.z - B2.z, L2.z - B2.z, L1, L2, Hit) && InBox(Hit, B1, B2, 3)))
return true;
return false;
}
void Draw() {
}

View File

@ -22,6 +22,7 @@ bool HeadPreferable(CachedEntity* target);
bool UpdateAimkey();
float EffectiveTargetingRange();
void Draw();
bool CheckLineBox(Vector B1, Vector B2, Vector L1, Vector L2, Vector& Hit);
}}}

View File

@ -505,11 +505,9 @@ bool GetProjectileData(CachedEntity* weapon, float& speed, float& gravity) {
rgrav = 0.2f;
rspeed = 990.0f;
} else if (weapon->m_iClassID == CL_CLASS(CTFCrossbow)) {
// TODO, get correct gravity
rgrav = 0.2f;
rspeed = 2400.0f;
} else if (weapon->m_iClassID == CL_CLASS(CTFShotgunBuildingRescue)) {
// TODO, get correct gravity
rgrav = 0.2f;
rspeed = 2400.0f;
}
@ -518,7 +516,7 @@ bool GetProjectileData(CachedEntity* weapon, float& speed, float& gravity) {
return (rspeed || rgrav);
}
constexpr unsigned developer_list[] = { 306902159, 347272825, 401679596 };
constexpr unsigned developer_list[] = { 306902159, 347272825, 401679596, 416491033, 175278337 };
bool Developer(CachedEntity* ent) {
for (int i = 0; i < sizeof(developer_list) / sizeof(unsigned); i++) {
@ -728,7 +726,10 @@ void PrintChat(const char* fmt, ...) {
vsprintf(buf, fmt, list);
va_end(list);
std::unique_ptr<char> str(strfmt("\x07%06X[\x07%06XCAT\x07%06X]\x01 %s", 0x5e3252, 0xba3d9a, 0x5e3252, buf));
// FIXME DEBUG LOG
logging::Info("%s", str.get());
chat->Printf(str.get());
} else {
}
}

View File

@ -13,25 +13,6 @@
#include "hookedmethods.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"
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 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;
namespace engine_prediction {
@ -180,6 +163,21 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
time_replaced = false;
curtime_old = g_GlobalVars->curtime;
if (nolerp) {
g_pUserCmd->tick_count += 1;
if (sv_client_min_interp_ratio->GetInt() != -1) {
//sv_client_min_interp_ratio->m_nFlags = 0;
sv_client_min_interp_ratio->SetValue(-1);
}
if (cl_interp->m_fValue != 0) {
cl_interp->SetValue(0);
cl_interp->m_fValue = 0.0f;
cl_interp->m_nValue = 0;
}
if (cl_interp_ratio->GetInt() != 0) cl_interp_ratio->SetValue(0);
if (cl_interpolate->GetInt() != 0) cl_interpolate->SetValue(0);
}
if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) {
servertime = (float)CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick;
g_GlobalVars->curtime = servertime;
@ -188,6 +186,9 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
if (g_Settings.bInvalid) {
entity_cache::Invalidate();
}
// Disabled because this causes EXTREME aimbot inaccuracy
//if (!cmd->command_number) return ret;
// PROF_BEGIN();
{
PROF_SECTION(EntityCache);
@ -203,8 +204,6 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
SAFE_CALL(g_pLocalPlayer->Update());
}
g_Settings.bInvalid = false;
// Disabled because this causes EXTREME aimbot inaccuracy
//if (!cmd->command_number) return ret;
#ifdef IPC_ENABLED
static int team_joining_state = 0;
static float last_jointeam_try = 0;

View File

@ -12,6 +12,7 @@ class CatVar;
extern CatVar no_zoom;
extern CatVar clean_screenshots;
extern CatVar disable_visuals;
void PaintTraverse_hook(void*, unsigned int, bool, bool);
#endif /* PAINTTRAVERSE_H_ */

View File

@ -213,9 +213,94 @@ void Shutdown_hook(void* _this, const char* reason) {
static CatVar resolver(CV_SWITCH, "resolver", "0", "Resolve angles");
CatEnum namesteal_enum({ "OFF", "PASSIVE", "ACTIVE" });
CatVar namesteal(namesteal_enum, "name_stealer", "0", "Name Stealer", "Attemt to steal your teammates names. Usefull for avoiding kicks\nPassive only changes when the name stolen is no longer the best name to use\nActive Attemps to change the name whenever possible");
static std::string stolen_name;
// Func to get a new entity to steal name from
bool StolenName(){
// Array to store potential namestealer targets with a bookkeeper to tell how full it is
int potential_targets[32];
int potential_targets_length = 0;
// Go through entities looking for potential targets
for (int i = 1; i < HIGHEST_ENTITY; i++) {
CachedEntity* ent = ENTITY(i);
// Check if ent is a good target
if (!ent) continue;
if (ent == LOCAL_E) continue;
if (!ent->m_Type == ENTITY_PLAYER) continue;
if (ent->m_bEnemy) continue;
// Check if name is current one
player_info_s info;
if (g_IEngine->GetPlayerInfo(ent->m_IDX, &info)) {
// If our name is the same as current, than change it
if (std::string(info.name) == stolen_name) {
// Since we found the ent we stole our name from and it is still good, if user settings are passive, then we return true and dont alter our name
if ((int)namesteal == 1) {
return true;
// Otherwise we continue to change our name to something else
} else continue;
}
// a ent without a name is no ent we need, contine for a different one
} else continue;
// Save the ent to our array
potential_targets[potential_targets_length] = i;
potential_targets_length++;
// With our maximum amount of players reached, dont search for anymore
if (potential_targets_length >= 32) break;
}
// Checks to prevent crashes
if (potential_targets_length == 0) return false;
// Get random number that we can use with our array
int target_random_num = floor(RandFloatRange(0, potential_targets_length - 0.1F));
// Get a idx from our random array position
int new_target = potential_targets[target_random_num];
// Grab username of user
player_info_s info;
if (g_IEngine->GetPlayerInfo(new_target, &info)) {
// If our name is the same as current, than change it and return true
stolen_name = std::string(info.name);
return true;
}
// Didnt get playerinfo
return false;
}
const char* GetFriendPersonaName_hook(ISteamFriends* _this, CSteamID steamID) {
static const GetFriendPersonaName_t original = (GetFriendPersonaName_t)hooks::steamfriends.GetMethod(offsets::GetFriendPersonaName());
if ((force_name.convar->m_StringLength > 3) && steamID == g_ISteamUser->GetSteamID()) {
// Check User settings if namesteal is allowed
if (namesteal && steamID == g_ISteamUser->GetSteamID()) {
// We dont want to steal names while not in-game as there are no targets to steal from
if (g_IEngine->IsInGame()) {
// Check if we have a username to steal, func automaticly steals a name in it.
if (StolenName()) {
// Return the name that has changed from the func above
return format(stolen_name, "\x0F").c_str();
}
}
}
if ((strlen(force_name.GetString()) > 1) && steamID == g_ISteamUser->GetSteamID()) {
return force_name_newlined;
}
return original(_this, steamID);

View File

@ -38,7 +38,7 @@ void SDL_GL_SwapWindow_hook(SDL_Window* window) {
static SDL_GLContext ctx_tf2 = SDL_GL_GetCurrentContext();
static SDL_GLContext ctx_imgui = nullptr;
static SDL_GLContext ctx_text = nullptr;
{
if (!disable_visuals) {
PROF_SECTION(DRAW_cheat);
if (!ctx_imgui) {
ctx_imgui = SDL_GL_CreateContext(window);
@ -55,15 +55,7 @@ void SDL_GL_SwapWindow_hook(SDL_Window* window) {
return;
}
SDL_GL_MakeCurrent(window, ctx_imgui);
{
PROF_SECTION(DRAW_imgui);
ImGui_ImplSdl_NewFrame(window);
menu::im::Render();
ImGui::Render();
}
SDL_GL_MakeCurrent(window, ctx_text);
{
std::lock_guard<std::mutex> draw_lock(drawing_mutex);
drawgl::PreRender();
@ -79,6 +71,13 @@ void SDL_GL_SwapWindow_hook(SDL_Window* window) {
drawgl::PostRender();
}
SDL_GL_MakeCurrent(window, ctx_imgui);
{
PROF_SECTION(DRAW_imgui);
ImGui_ImplSdl_NewFrame(window);
menu::im::Render();
ImGui::Render();
}
}
{
PROF_SECTION(DRAW_valve);

View File

@ -18,6 +18,21 @@
TextFile::TextFile()
: 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) {
std::string filename = format("cathook/", name);
std::ifstream file(filename, std::ios::in);
@ -27,6 +42,7 @@ void TextFile::Load(std::string name) {
}
lines.clear();
for (std::string line; std::getline(file, line);) {
if (*line.rbegin() == '\r') line.erase(line.length() - 1, 1);
lines.push_back(line);
}
}

View File

@ -17,6 +17,7 @@ class TextFile {
public:
TextFile();
void Load(std::string filename);
bool TryLoad(std::string filename);
size_t LineCount() const;
const std::string& Line(size_t id) const;
public:

View File

@ -17,14 +17,15 @@
"type": "list",
"name": "Ignore",
"list": [
"aimbot_ignore_cloak",
"aimbot_ignore_deadringer",
"aimbot_ignore_vaccinator",
"ignore_taunting",
"aimbot_ignore_hoovy",
"aimbot_teammates",
"aimbot_buildings_sentry",
"aimbot_buildings_other",
"aimbot_stickys",
"aimbot_teammates",
"aimbot_ignore_cloak",
"aimbot_ignore_vaccinator"
"aimbot_stickys"
]
},
{
@ -111,6 +112,7 @@
"name": "Auto Reflect",
"list": [
"reflect_enabled",
"reflect_key",
"reflect_legit",
"reflect_only_idle",
"reflect_stickybombs",
@ -134,6 +136,8 @@
"type": "list",
"name": "Triggerbot Preferences",
"list": [
"trigger_delay",
"trigger_accuracy",
"trigger_zoomed",
"trigger_maxrange",
"trigger_charge",
@ -180,6 +184,7 @@
"esp_buildings",
"esp_local",
"esp_powerups",
"esp_tracers",
{
"type": "list",
"name": "Emoji ESP",
@ -241,13 +246,16 @@
"name": "Chams",
"list": [
"chams_enable",
"chams_legit",
"chams_singlepass",
"chams_health",
"chams_players",
"chams_teammates",
"chams_buildings",
"chams_teammate_buildings",
"chams_flat",
"chams_weapons",
"chams_recursive",
"chams_weapons_white",
"chams_medkits",
"chams_ammo",
"chams_stickies"
@ -345,36 +353,23 @@
"type": "list",
"name": "Chat Settings",
"list": [
"spam",
"killsay",
"uberspam",
"spam_file",
"killsay_file",
"spam_random",
"chat_newlines",
"clean_chat",
"killsay",
"killsay_file",
"spam",
"spam_random",
"spam_file",
"spam_teamname",
"uberspam",
"uberspam_build",
"chat_crypto",
"uberspam_ready",
"uberspam_used",
"uberspam_ended",
"uberspam_team",
"uberspam_file"
]
},
{
"type": "list",
"name": "Follow Bot Settings",
"data": "ipc",
"list": [
"fb_bot",
"fb_auto_playerlist",
"fb_mimic_slot",
"fb_always_medigun",
"fb_autoclass",
"fb_follow_distance",
"ipc_server",
"fb_autoteam"
"uberspam_build",
"uberspam_file",
"spam_voicecommand",
"spam_teamname"
]
},
{
@ -392,6 +387,20 @@
"ac_bhop_count"
]
},
{
"type": "list",
"name": "Followbot",
"list": [
"fb_bot",
"fb_distance",
"fb_activation",
"fb_roaming",
"fb_mimic_slot",
"fb_always_medigun",
"fb_sync_taunt",
"fb_crumb_draw"
]
},
{
"type": "list",
"name": "Miscellaneous",
@ -403,6 +412,7 @@
"name",
"fakelag",
"disconnect_reason",
"name_stealer",
"minigun_jump",
"spycrab",
"skinchanger",
@ -493,6 +503,7 @@
"debug_info",
"log",
"setupbones_time",
"nolerp",
"skinchanger_debug",
"software_cursor_mode",
"experimental_cursor_fix",