compiles with -e TEXTMODE=1
This commit is contained in:
parent
da0536a954
commit
905ff7efff
34
makefile
34
makefile
@ -53,9 +53,21 @@ LDFLAGS+=-flto
|
||||
endif
|
||||
endif
|
||||
LDLIBS=-lssl -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
|
||||
|
||||
OUT_NAME = libcathook.so
|
||||
|
||||
ifdef TEXTMODE
|
||||
$(info Compiling for text mode only!)
|
||||
N_LDLIBS = -lssl -l:libSDL2-2.0.so.0 -l:libGLEW.so -l:libfreetype.so
|
||||
LDLIBS := $(filter-out $(N_LDLIBS),$(LDLIBS))
|
||||
N_INCLUDES = -isystemsrc/freetype-gl -isystemsrc/imgui -isystem/usr/local/include/freetype2 -isystem/usr/include/freetype2
|
||||
INCLUDES := $(filter-out $(N_INCLUDES),$(INCLUDES))
|
||||
DEFINES += TEXTMODE=1
|
||||
#OUT_NAME := libcathook-textmode.so
|
||||
endif
|
||||
|
||||
SRC_DIR = src
|
||||
RES_DIR = res
|
||||
OUT_NAME = libcathook.so
|
||||
TARGET_DIR = bin
|
||||
TARGET = $(TARGET_DIR)/$(OUT_NAME)
|
||||
SOURCES = $(shell find $(SRC_DIR) -name "*.c*" -print)
|
||||
@ -96,10 +108,26 @@ CXXFLAGS+=$(addprefix -D,$(DEFINES))
|
||||
CFLAGS+=$(addprefix -D,$(DEFINES))
|
||||
|
||||
CXXFLAGS+=$(INCLUDES)
|
||||
CXXFLAGS+=$(shell sdl2-config --cflags)
|
||||
CFLAGS+=$(INCLUDES)
|
||||
|
||||
ifdef TEXTMODE
|
||||
|
||||
N_SOURCES := hacks/ESP.cpp hacks/SkinChanger.cpp hacks/SpyAlert.cpp hacks/Radar.cpp fidgetspinner.cpp ftrender.cpp hooks/sdl.cpp drawmgr.cpp drawgl.cpp
|
||||
N_SOURCES := $(addprefix $(SRC_DIR)/,$(N_SOURCES))
|
||||
|
||||
SOURCES := $(filter-out $(shell find $(SRC_DIR)/gui -name "*.cpp" -print),$(SOURCES))
|
||||
SOURCES := $(filter-out $(shell find $(SRC_DIR)/freetype-gl -name "*.c*" -print),$(SOURCES))
|
||||
SOURCES := $(filter-out $(shell find $(SRC_DIR)/imgui -name "*.c*" -print),$(SOURCES))
|
||||
SOURCES := $(filter-out $(N_SOURCES),$(SOURCES))
|
||||
|
||||
|
||||
else
|
||||
|
||||
CXXFLAGS+=$(shell sdl2-config --cflags)
|
||||
CFLAGS+=$(shell sdl2-config --cflags)
|
||||
|
||||
endif
|
||||
|
||||
.PHONY: clean directories echo
|
||||
|
||||
all:
|
||||
@ -136,7 +164,7 @@ src/sdk/utlbuffer.o : CFLAGS+=-w
|
||||
|
||||
.cpp.o:
|
||||
@echo Compiling $<
|
||||
@$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
.c.o:
|
||||
@echo Compiling $<
|
||||
|
@ -5,6 +5,8 @@
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
#include "atlas.hpp"
|
||||
|
||||
#include "drawing.h"
|
||||
@ -36,3 +38,5 @@ void Init() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
24
src/common.h
24
src/common.h
@ -37,17 +37,29 @@
|
||||
#include "averager.hpp"
|
||||
|
||||
#include "aftercheaders.h"
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
extern "C" {
|
||||
#include <vec234.h>
|
||||
}
|
||||
|
||||
#include "ftrender.hpp"
|
||||
#include "drawing.h"
|
||||
#include "fidgetspinner.hpp"
|
||||
#include "drawgl.hpp"
|
||||
#include "EffectGlow.hpp"
|
||||
#include "atlas.hpp"
|
||||
#include "EffectChams.hpp"
|
||||
#include "drawmgr.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
#include "macros.hpp"
|
||||
#include "colors.hpp"
|
||||
#include "profiler.h"
|
||||
#include "ftrender.hpp"
|
||||
#include "offsets.hpp"
|
||||
#include "drawing.h"
|
||||
#include "entitycache.h"
|
||||
#include "fidgetspinner.hpp"
|
||||
#include "hoovy.hpp"
|
||||
#include "enums.h"
|
||||
#include "projlogging.hpp"
|
||||
@ -57,14 +69,12 @@ extern "C" {
|
||||
#include "entityhitboxcache.hpp"
|
||||
#include "globals.h"
|
||||
#include "helpers.h"
|
||||
#include "drawgl.hpp"
|
||||
#include "playerlist.hpp"
|
||||
#include "interfaces.h"
|
||||
#include "EffectGlow.hpp"
|
||||
#include "drawmgr.hpp"
|
||||
#include "localplayer.h"
|
||||
#include "conditions.h"
|
||||
#include "logging.h"
|
||||
#include "targethelper.h"
|
||||
#include "playerresource.h"
|
||||
#include "usercmd.h"
|
||||
#include "trace.h"
|
||||
@ -72,13 +82,11 @@ extern "C" {
|
||||
#include "netvars.h"
|
||||
#include "vfunc.h"
|
||||
#include "hooks.h"
|
||||
#include "atlas.hpp"
|
||||
#include "prediction.h"
|
||||
#include "conditions.h"
|
||||
#include "itemtypes.h"
|
||||
#include "chatstack.h"
|
||||
#include "textfile.h"
|
||||
#include "EffectChams.hpp"
|
||||
#include "ipc.h"
|
||||
#include "hooks/hookedmethods.h"
|
||||
#include "classinfo/classinfo.hpp"
|
||||
|
@ -5,6 +5,8 @@
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
#include "common.h"
|
||||
#include "sdk.h"
|
||||
#include "ftrender.hpp"
|
||||
@ -112,3 +114,4 @@ bool draw::WorldToScreen(const Vector& origin, Vector& screen) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
61
src/hack.cpp
61
src/hack.cpp
@ -40,7 +40,10 @@
|
||||
#define STRINGIFY(x) #x
|
||||
#define TO_STRING(x) STRINGIFY(x)
|
||||
|
||||
#ifndef TEXTMODE
|
||||
#include "ftrender.hpp"
|
||||
#endif
|
||||
|
||||
#include "hooks/hookedmethods.h"
|
||||
#include "init.hpp"
|
||||
|
||||
@ -94,6 +97,10 @@ const std::string& hack::GetType() {
|
||||
version += " DYNAMIC";
|
||||
#endif
|
||||
|
||||
#ifdef TEXTMODE
|
||||
version += " TEXTMODE";
|
||||
#endif
|
||||
|
||||
version = version.substr(1);
|
||||
version_set = true;
|
||||
return version;
|
||||
@ -105,6 +112,8 @@ std::stack<std::string>& hack::command_stack() {
|
||||
return stack;
|
||||
}
|
||||
|
||||
#ifndef TEXTMODE /* Why would we need colored chat stuff in textmode? */
|
||||
|
||||
class AdvancedEventListener : public IGameEventListener {
|
||||
public:
|
||||
virtual void FireGameEvent( KeyValues * event) {
|
||||
@ -136,6 +145,8 @@ public:
|
||||
|
||||
AdvancedEventListener adv_event_listener {};
|
||||
|
||||
#endif /* TEXTMODE */
|
||||
|
||||
void hack::ExecuteCommand(const std::string command) {
|
||||
std::lock_guard<std::mutex> guard(hack::command_stack_mutex);
|
||||
hack::command_stack().push(command);
|
||||
@ -151,7 +162,9 @@ void hack::CC_Cat(const CCommand& args) {
|
||||
}
|
||||
|
||||
void hack::Initialize() {
|
||||
// Essential files must always exist
|
||||
// Essential files must always exist, except when the game is running in text mode.
|
||||
#ifndef TEXTMODE
|
||||
|
||||
{
|
||||
std::vector<std::string> essential = {
|
||||
"shaders/v2f-c4f.frag", "shaders/v2f-c4f.vert",
|
||||
@ -167,6 +180,8 @@ void hack::Initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* TEXTMODE */
|
||||
|
||||
logging::Info("Initializing...");
|
||||
srand(time(0));
|
||||
prctl(PR_SET_DUMPABLE,0,42,42,42);
|
||||
@ -180,6 +195,9 @@ void hack::Initialize() {
|
||||
logging::Info("Is CSS? %d", IsCSS());
|
||||
logging::Info("Is TF? %d", IsTF());
|
||||
InitClassTable();
|
||||
|
||||
#ifndef TEXTMODE /* We don't need medal to flip 100% when running textmode */
|
||||
|
||||
IF_GAME (IsTF2()) {
|
||||
uintptr_t mmmf = (gSignatures.GetClientSignature("C7 44 24 04 09 00 00 00 BB ? ? ? ? C7 04 24 00 00 00 00 E8 ? ? ? ? BA ? ? ? ? 85 C0 B8 ? ? ? ? 0F 44 DA") + 37);
|
||||
if (mmmf) {
|
||||
@ -194,23 +212,29 @@ void hack::Initialize() {
|
||||
Patch((void*)canInspectSig, (void*)patch, 3);
|
||||
}*/
|
||||
}
|
||||
|
||||
#endif /* TEXTMODE */
|
||||
|
||||
BeginConVars();
|
||||
hack::c_Cat = CreateConCommand(CON_NAME, &hack::CC_Cat, "Info");
|
||||
g_Settings.Init();
|
||||
EndConVars();
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
draw::Initialize();
|
||||
#if ENABLE_GUI
|
||||
g_pGUI = new CatGUI();
|
||||
g_pGUI->Setup();
|
||||
#endif
|
||||
|
||||
#endif /* TEXTMODE */
|
||||
|
||||
gNetvars.init();
|
||||
InitNetVars();
|
||||
g_pLocalPlayer = new LocalPlayer();
|
||||
g_pPlayerResource = new TFPlayerResource();
|
||||
|
||||
/*
|
||||
* TIME FOR HOOKING! wow
|
||||
*/
|
||||
hooks::panel.Set(g_IPanel);
|
||||
hooks::panel.HookMethod((void*)PaintTraverse_hook, offsets::PaintTraverse());
|
||||
hooks::panel.Apply();
|
||||
@ -222,7 +246,9 @@ void hack::Initialize() {
|
||||
}
|
||||
hooks::clientmode.Set((void*)clientMode);
|
||||
hooks::clientmode.HookMethod((void*)CreateMove_hook, offsets::CreateMove());
|
||||
#ifndef TEXTMODE
|
||||
hooks::clientmode.HookMethod((void*)OverrideView_hook, offsets::OverrideView());
|
||||
#endif /* TEXTMODE */
|
||||
hooks::clientmode.HookMethod((void*)LevelInit_hook, offsets::LevelInit());
|
||||
hooks::clientmode.HookMethod((void*)LevelShutdown_hook, offsets::LevelShutdown());
|
||||
hooks::clientmode.Apply();
|
||||
@ -232,14 +258,18 @@ void hack::Initialize() {
|
||||
hooks::client.Set(g_IBaseClient);
|
||||
hooks::client.HookMethod((void*)FrameStageNotify_hook, offsets::FrameStageNotify());
|
||||
hooks::client.HookMethod((void*)DispatchUserMessage_hook, offsets::DispatchUserMessage());
|
||||
#ifndef TEXTMODE
|
||||
hooks::client.HookMethod((void*)IN_KeyEvent_hook, offsets::IN_KeyEvent());
|
||||
#endif /* TEXTMODE */
|
||||
hooks::client.Apply();
|
||||
hooks::input.Set(g_IInput);
|
||||
hooks::input.HookMethod((void*)GetUserCmd_hook, offsets::GetUserCmd());
|
||||
hooks::input.Apply();
|
||||
#ifndef TEXTMODE
|
||||
hooks::modelrender.Set(g_IVModelRender);
|
||||
hooks::modelrender.HookMethod((void*)DrawModelExecute_hook, offsets::DrawModelExecute());
|
||||
hooks::modelrender.Apply();
|
||||
#endif /* TEXTMODE */
|
||||
hooks::steamfriends.Set(g_ISteamFriends);
|
||||
hooks::steamfriends.HookMethod((void*)GetFriendPersonaName_hook, offsets::GetFriendPersonaName());
|
||||
hooks::steamfriends.Apply();
|
||||
@ -256,18 +286,21 @@ void hack::Initialize() {
|
||||
//hooks::hkBaseClientState8->Apply();
|
||||
|
||||
// FIXME [MP]
|
||||
InitStrings();
|
||||
hacks::shared::killsay::Init();
|
||||
#if ENABLE_GUI
|
||||
// cat_reloadscheme to load imgui
|
||||
hack::command_stack().push("cat_reloadscheme");
|
||||
#endif
|
||||
hack::command_stack().push("exec cat_autoexec");
|
||||
hack::command_stack().push("cat_killsay_reload");
|
||||
hack::command_stack().push("cat_spam_reload");
|
||||
logging::Info("Hooked!");
|
||||
velocity::Init();
|
||||
playerlist::Load();
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
InitStrings();
|
||||
#if ENABLE_GUI
|
||||
// cat_reloadscheme to load imgui
|
||||
hack::command_stack().push("cat_reloadscheme");
|
||||
#endif
|
||||
if (g_ppScreenSpaceRegistrationHead && g_pScreenSpaceEffects) {
|
||||
effect_chams::g_pEffectChams = new CScreenSpaceEffectRegistration("_cathook_chams", &effect_chams::g_EffectChams);
|
||||
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_chams");
|
||||
@ -275,20 +308,24 @@ void hack::Initialize() {
|
||||
effect_glow::g_pEffectGlow = new CScreenSpaceEffectRegistration("_cathook_glow", &effect_glow::g_EffectGlow);
|
||||
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_glow");
|
||||
}
|
||||
//for (CScreenSpaceEffectRegistration* reg = *g_ppScreenSpaceRegistrationHead; reg; reg = reg->m_pNext) {
|
||||
// logging::Info("%s", reg->m_pEffectName);
|
||||
//}
|
||||
logging::Info("SSE enabled..");
|
||||
DoSDLHooking();
|
||||
logging::Info("SDL hooking done");
|
||||
g_IGameEventManager->AddListener(&adv_event_listener, false);
|
||||
|
||||
#endif /* TEXTMODE */
|
||||
|
||||
hacks::shared::anticheat::Init();
|
||||
hacks::tf2::healarrow::Init();
|
||||
|
||||
#ifndef TEXTMODE
|
||||
InitSpinner();
|
||||
logging::Info("Initialized Fidget Spinner");
|
||||
hacks::shared::spam::Init();
|
||||
backpacktf::init();
|
||||
logging::Info("Initialized Backpack.TF integration");
|
||||
#endif
|
||||
|
||||
hacks::shared::walkbot::Initialize();
|
||||
|
||||
logging::Info("Clearing initializer stack");
|
||||
|
@ -5,36 +5,7 @@
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#include "Aimbot.h"
|
||||
|
||||
#include <globalvars_base.h>
|
||||
#include <icliententity.h>
|
||||
#include <inputsystem/ButtonCode.h>
|
||||
#include <inputsystem/iinputsystem.h>
|
||||
#include <mathlib/vector.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "../aftercheaders.h"
|
||||
#include "../common.h"
|
||||
#include "../conditions.h"
|
||||
#include "../crits.h"
|
||||
#include "../cvwrapper.h"
|
||||
#include "../drawing.h"
|
||||
#include "../entitycache.h"
|
||||
#include "../globals.h"
|
||||
#include "../helpers.h"
|
||||
#include "../hoovy.hpp"
|
||||
#include "../interfaces.h"
|
||||
#include "../localplayer.h"
|
||||
#include "../netvars.h"
|
||||
#include "../playerlist.hpp"
|
||||
#include "../prediction.h"
|
||||
#include "../sdk/in_buttons.h"
|
||||
#include "../targethelper.h"
|
||||
#include "../usercmd.h"
|
||||
#include "AntiAim.h"
|
||||
#include "ESP.h"
|
||||
#include "FollowBot.h"
|
||||
|
||||
namespace hacks { namespace shared { namespace aimbot {
|
||||
|
||||
@ -172,8 +143,10 @@ void CreateMove() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TEXTMODE
|
||||
// Set target esp color to pink
|
||||
hacks::shared::esp::SetEntityColor(target, colors::pink);
|
||||
#endif
|
||||
|
||||
// Check if player can aim and if aimkey allows aiming
|
||||
// We also preform a CanShoot check here per the old canshoot method
|
||||
@ -992,6 +965,8 @@ void Reset() {
|
||||
projectile_mode = false;
|
||||
}
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
// 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");
|
||||
void DrawText() {
|
||||
@ -1054,5 +1029,6 @@ void DrawText() {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
@ -39,7 +39,9 @@ extern int target_eid;
|
||||
|
||||
// Functions called by other functions for when certian game calls are run
|
||||
void CreateMove();
|
||||
#ifndef TEXTMODE
|
||||
void DrawText();
|
||||
#endif
|
||||
void Reset();
|
||||
|
||||
// Stuff to make storing functions easy
|
||||
|
@ -77,6 +77,7 @@ void CreateMove() {
|
||||
}
|
||||
|
||||
void Draw() {
|
||||
#ifndef TEXTMODE
|
||||
if (healarrow) {
|
||||
if ((g_GlobalVars->curtime - healarrow_time) < float(healarrow_timeout)) {
|
||||
AddCenterString(format("Heal arrow charge: ", int(min(100.0f, (g_GlobalVars->curtime - healarrow_time) / float(healarrow_timeout)) * 100.0f), '%'), colors::yellow);
|
||||
@ -85,6 +86,9 @@ void Draw() {
|
||||
AddCenterString("Heal arrow ready", colors::green);
|
||||
}
|
||||
}
|
||||
#else
|
||||
logging::Info("[WTF] THIS SHOULD NEVER BE CALLED!!! CALL THE POLICE!!!");
|
||||
#endif
|
||||
}
|
||||
|
||||
}}}
|
||||
|
@ -349,6 +349,8 @@ void CreateMove() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
void DrawText() {
|
||||
if (crit_info && CE_GOOD(LOCAL_W)) {
|
||||
if (CritKeyDown() || experimental_crit_hack.KeyDown()) {
|
||||
@ -433,6 +435,8 @@ void DrawText() {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void Schema_Reload() {
|
||||
logging::Info("Custom schema loading is not supported right now.");
|
||||
/*
|
||||
|
@ -13,7 +13,9 @@
|
||||
namespace hacks { namespace shared { namespace misc {
|
||||
|
||||
void CreateMove();
|
||||
#ifndef TEXTMODE
|
||||
void DrawText();
|
||||
#endif
|
||||
|
||||
extern IClientEntity* found_crit_weapon;
|
||||
extern int found_crit_number;
|
||||
|
@ -757,6 +757,47 @@ void UpdateWalker() {
|
||||
}
|
||||
}
|
||||
|
||||
bool ShouldSpawnNode() {
|
||||
if (not state::node_good(state::active_node))
|
||||
return true;
|
||||
|
||||
bool was_jumping = state::last_node_buttons & IN_JUMP;
|
||||
bool is_jumping = g_pUserCmd->buttons & IN_JUMP;
|
||||
|
||||
if (was_jumping != is_jumping and is_jumping)
|
||||
return true;
|
||||
|
||||
if ((state::last_node_buttons & IN_DUCK) != (g_pUserCmd->buttons & IN_DUCK))
|
||||
return true;
|
||||
|
||||
auto& node = state::nodes[state::active_node];
|
||||
|
||||
if (distance_2d(node.xyz()) > float(spawn_distance)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void RecordNode() {
|
||||
index_t node = CreateNode(g_pLocalPlayer->v_Origin);
|
||||
auto& n = state::nodes[node];
|
||||
if (g_pUserCmd->buttons & IN_DUCK)
|
||||
n.flags |= NF_DUCK;
|
||||
if (g_pUserCmd->buttons & IN_JUMP)
|
||||
n.flags |= NF_JUMP;
|
||||
if (state::node_good(state::active_node)) {
|
||||
auto& c = state::nodes[state::active_node];
|
||||
n.link(state::active_node);
|
||||
c.link(node);
|
||||
logging::Info("[wb] Node %u auto-linked to node %u at (%.2f %.2f %.2f)", node, state::active_node, c.x, c.y, c.z);
|
||||
}
|
||||
state::last_node_buttons = g_pUserCmd->buttons;
|
||||
state::active_node = node;
|
||||
}
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
// Draws a single colored connection between 2 nodes
|
||||
void DrawConnection(index_t a, connection_s& b) {
|
||||
if (b.free())
|
||||
@ -834,45 +875,6 @@ void DrawNode(index_t node, bool draw_back) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ShouldSpawnNode() {
|
||||
if (not state::node_good(state::active_node))
|
||||
return true;
|
||||
|
||||
bool was_jumping = state::last_node_buttons & IN_JUMP;
|
||||
bool is_jumping = g_pUserCmd->buttons & IN_JUMP;
|
||||
|
||||
if (was_jumping != is_jumping and is_jumping)
|
||||
return true;
|
||||
|
||||
if ((state::last_node_buttons & IN_DUCK) != (g_pUserCmd->buttons & IN_DUCK))
|
||||
return true;
|
||||
|
||||
auto& node = state::nodes[state::active_node];
|
||||
|
||||
if (distance_2d(node.xyz()) > float(spawn_distance)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void RecordNode() {
|
||||
index_t node = CreateNode(g_pLocalPlayer->v_Origin);
|
||||
auto& n = state::nodes[node];
|
||||
if (g_pUserCmd->buttons & IN_DUCK)
|
||||
n.flags |= NF_DUCK;
|
||||
if (g_pUserCmd->buttons & IN_JUMP)
|
||||
n.flags |= NF_JUMP;
|
||||
if (state::node_good(state::active_node)) {
|
||||
auto& c = state::nodes[state::active_node];
|
||||
n.link(state::active_node);
|
||||
c.link(node);
|
||||
logging::Info("[wb] Node %u auto-linked to node %u at (%.2f %.2f %.2f)", node, state::active_node, c.x, c.y, c.z);
|
||||
}
|
||||
state::last_node_buttons = g_pUserCmd->buttons;
|
||||
state::active_node = node;
|
||||
}
|
||||
|
||||
void DrawPath() {
|
||||
for (index_t i = 0; i < state::nodes.size(); i++) {
|
||||
DrawNode(i, true);
|
||||
@ -914,6 +916,8 @@ void Draw() {
|
||||
DrawPath();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void OnLevelInit() {
|
||||
if (leave_if_empty && state::state == WB_REPLAYING) {
|
||||
nodes.clear();
|
||||
|
@ -10,7 +10,9 @@
|
||||
namespace hacks { namespace shared { namespace walkbot {
|
||||
|
||||
void Initialize();
|
||||
#ifndef TEXTMODE
|
||||
void Draw();
|
||||
#endif
|
||||
void Move();
|
||||
void OnLevelInit();
|
||||
|
||||
|
@ -8,6 +8,15 @@
|
||||
#ifndef HACKS_HACKLIST_H_
|
||||
#define HACKS_HACKLIST_H_
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
#include "ESP.h"
|
||||
#include "SkinChanger.hpp"
|
||||
#include "Radar.hpp"
|
||||
#include "SpyAlert.h"
|
||||
|
||||
#endif
|
||||
|
||||
#include "Aimbot.h"
|
||||
#include "AntiAim.h"
|
||||
#include "AntiDisguise.h"
|
||||
@ -16,7 +25,6 @@
|
||||
#include "AutoSticky.h"
|
||||
#include "AntiCheat.hpp"
|
||||
#include "Bunnyhop.h"
|
||||
#include "ESP.h"
|
||||
#include "LagExploit.hpp"
|
||||
#include "Walkbot.hpp"
|
||||
#include "AutoJoin.hpp"
|
||||
@ -25,15 +33,12 @@
|
||||
#include "FollowBot.h"
|
||||
#include "HealArrows.hpp"
|
||||
#include "Misc.h"
|
||||
#include "SpyAlert.h"
|
||||
#include "Trigger.h"
|
||||
#include "KillSay.h"
|
||||
#include "UberSpam.hpp"
|
||||
#include "SkinChanger.hpp"
|
||||
#include "Achievement.h"
|
||||
#include "Spam.h"
|
||||
#include "Noisemaker.h"
|
||||
#include "FollowBot.h"
|
||||
#include "Radar.hpp"
|
||||
|
||||
#endif /* HACKS_HACKLIST_H_ */
|
||||
|
@ -265,10 +265,12 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
SAFE_CALL(UpdateHoovyList());
|
||||
}
|
||||
g_pLocalPlayer->v_OrigViewangles = cmd->viewangles;
|
||||
#ifndef TEXTMODE
|
||||
{
|
||||
PROF_SECTION(CM_esp);
|
||||
SAFE_CALL(hacks::shared::esp::CreateMove());
|
||||
}
|
||||
#endif
|
||||
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon())) {
|
||||
{
|
||||
PROF_SECTION(CM_walkbot);
|
||||
|
@ -41,10 +41,12 @@ void PaintTraverse_hook(void* _this, unsigned int vp, bool fr, bool ar) {
|
||||
if (!segvcatch::handler_segv) segvcatch::init_fpe();
|
||||
}
|
||||
#endif
|
||||
#ifndef TEXTMODE
|
||||
if (!textures_loaded) {
|
||||
textures_loaded = true;
|
||||
hacks::tf::radar::Init();
|
||||
}
|
||||
#endif
|
||||
if (pure_bypass) {
|
||||
if (!pure_addr) {
|
||||
pure_addr = *reinterpret_cast<void***>(gSignatures.GetEngineSignature("55 89 E5 83 EC 18 A1 ? ? ? ? 89 04 24 E8 0D FF FF FF A1 ? ? ? ? 85 C0 74 08 89 04 24 E8 ? ? ? ? C9 C3") + 7);
|
||||
@ -139,7 +141,7 @@ void PaintTraverse_hook(void* _this, unsigned int vp, bool fr, bool ar) {
|
||||
if (clean_screenshots && g_IEngine->IsTakingScreenshot()) return;
|
||||
|
||||
PROF_SECTION(PT_active);
|
||||
|
||||
#ifndef TEXTMODE
|
||||
draw::UpdateWTS();
|
||||
BeginCheatVisuals();
|
||||
DrawCheatVisuals();
|
||||
@ -151,6 +153,7 @@ void PaintTraverse_hook(void* _this, unsigned int vp, bool fr, bool ar) {
|
||||
|
||||
|
||||
EndCheatVisuals();
|
||||
#endif
|
||||
SEGV_END;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include "ucccccp.hpp"
|
||||
#include "hookedmethods.h"
|
||||
|
||||
#ifndef TEXTMODE
|
||||
|
||||
static CatVar no_invisibility(CV_SWITCH, "no_invis", "0", "Remove Invisibility", "Useful with chams!");
|
||||
|
||||
// This hook isn't used yet!
|
||||
@ -68,6 +70,41 @@ void DrawModelExecute_hook(IVModelRender* _this, const DrawModelState_t& state,
|
||||
original(_this, state, info, matrix);
|
||||
}
|
||||
|
||||
|
||||
int IN_KeyEvent_hook(void* _this, int eventcode, int keynum, const char* pszCurrentBinding) {
|
||||
static const IN_KeyEvent_t original = (IN_KeyEvent_t)hooks::client.GetMethod(offsets::IN_KeyEvent());
|
||||
#if ENABLE_GUI
|
||||
SEGV_BEGIN;
|
||||
if (g_pGUI->ConsumesKey((ButtonCode_t)keynum) && g_pGUI->Visible()) {
|
||||
return 0;
|
||||
}
|
||||
SEGV_END;
|
||||
#endif
|
||||
return original(_this, eventcode, keynum, pszCurrentBinding);
|
||||
}
|
||||
|
||||
CatVar override_fov_zoomed(CV_FLOAT, "fov_zoomed", "0", "FOV override (zoomed)", "Overrides FOV with this value when zoomed in (default FOV when zoomed is 20)");
|
||||
CatVar override_fov(CV_FLOAT, "fov", "0", "FOV override", "Overrides FOV with this value");
|
||||
|
||||
void OverrideView_hook(void* _this, CViewSetup* setup) {
|
||||
static const OverrideView_t original = (OverrideView_t)hooks::clientmode.GetMethod(offsets::OverrideView());
|
||||
static bool zoomed;
|
||||
SEGV_BEGIN;
|
||||
original(_this, setup);
|
||||
if (!cathook) return;
|
||||
if (g_pLocalPlayer->bZoomed && override_fov_zoomed) {
|
||||
setup->fov = override_fov_zoomed;
|
||||
} else {
|
||||
if (override_fov) {
|
||||
setup->fov = override_fov;
|
||||
}
|
||||
}
|
||||
draw::fov = setup->fov;
|
||||
SEGV_END;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool CanPacket_hook(void* _this) {
|
||||
const CanPacket_t original = (CanPacket_t)hooks::netchannel.GetMethod(offsets::CanPacket());
|
||||
SEGV_BEGIN;
|
||||
@ -96,18 +133,6 @@ CUserCmd* GetUserCmd_hook(IInput* _this, int sequence_number) {
|
||||
return def;
|
||||
}
|
||||
|
||||
int IN_KeyEvent_hook(void* _this, int eventcode, int keynum, const char* pszCurrentBinding) {
|
||||
static const IN_KeyEvent_t original = (IN_KeyEvent_t)hooks::client.GetMethod(offsets::IN_KeyEvent());
|
||||
#if ENABLE_GUI
|
||||
SEGV_BEGIN;
|
||||
if (g_pGUI->ConsumesKey((ButtonCode_t)keynum) && g_pGUI->Visible()) {
|
||||
return 0;
|
||||
}
|
||||
SEGV_END;
|
||||
#endif
|
||||
return original(_this, eventcode, keynum, pszCurrentBinding);
|
||||
}
|
||||
|
||||
static CatVar log_sent(CV_SWITCH, "debug_log_sent_messages", "0", "Log sent messages");
|
||||
|
||||
static CatCommand plus_use_action_slot_item_server("+cat_use_action_slot_item_server", "use_action_slot_item_server", []() {
|
||||
@ -332,11 +357,12 @@ void FrameStageNotify_hook(void* _this, int stage) {
|
||||
static const FrameStageNotify_t original = (FrameStageNotify_t)hooks::client.GetMethod(offsets::FrameStageNotify());
|
||||
SEGV_BEGIN;
|
||||
if (!g_IEngine->IsInGame()) g_Settings.bInvalid = true;
|
||||
// TODO hack FSN hook
|
||||
#ifndef TEXTMODE
|
||||
{
|
||||
PROF_SECTION(FSN_skinchanger);
|
||||
hacks::tf2::skinchanger::FrameStageNotify(stage);
|
||||
}
|
||||
#endif
|
||||
if (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) {
|
||||
angles::Update();
|
||||
hacks::shared::anticheat::CreateMove();
|
||||
@ -356,6 +382,7 @@ void FrameStageNotify_hook(void* _this, int stage) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef TEXTMODE
|
||||
if (cathook && !g_Settings.bInvalid && stage == FRAME_RENDER_START) {
|
||||
#if ENABLE_GUI
|
||||
if (cursor_fix_experimental) {
|
||||
@ -379,30 +406,11 @@ void FrameStageNotify_hook(void* _this, int stage) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* TEXTMODE */
|
||||
SAFE_CALL(original(_this, stage));
|
||||
SEGV_END;
|
||||
}
|
||||
|
||||
CatVar override_fov_zoomed(CV_FLOAT, "fov_zoomed", "0", "FOV override (zoomed)", "Overrides FOV with this value when zoomed in (default FOV when zoomed is 20)");
|
||||
CatVar override_fov(CV_FLOAT, "fov", "0", "FOV override", "Overrides FOV with this value");
|
||||
|
||||
void OverrideView_hook(void* _this, CViewSetup* setup) {
|
||||
static const OverrideView_t original = (OverrideView_t)hooks::clientmode.GetMethod(offsets::OverrideView());
|
||||
static bool zoomed;
|
||||
SEGV_BEGIN;
|
||||
original(_this, setup);
|
||||
if (!cathook) return;
|
||||
if (g_pLocalPlayer->bZoomed && override_fov_zoomed) {
|
||||
setup->fov = override_fov_zoomed;
|
||||
} else {
|
||||
if (override_fov) {
|
||||
setup->fov = override_fov;
|
||||
}
|
||||
}
|
||||
draw::fov = setup->fov;
|
||||
SEGV_END;
|
||||
}
|
||||
|
||||
static CatVar clean_chat(CV_SWITCH, "clean_chat", "0", "Clean chat", "Removes newlines from chat");
|
||||
static CatVar dispatch_log(CV_SWITCH, "debug_log_usermessages", "0", "Log dispatched user messages");
|
||||
|
||||
|
@ -81,7 +81,7 @@ void Prediction_CreateMove() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TEXTMODE
|
||||
void Prediction_PaintTraverse() {
|
||||
if (!debug_enginepred) return;
|
||||
for (int i = 1; i < predicted_player_count; i++) {
|
||||
@ -104,7 +104,7 @@ void Prediction_PaintTraverse() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Vector EnginePrediction(CachedEntity* entity, float time) {
|
||||
Vector result = entity->m_vecOrigin;
|
||||
IClientEntity* ent = RAW_ENT(entity);
|
||||
|
@ -24,7 +24,9 @@ float PlayerGravityMod(CachedEntity* player);
|
||||
|
||||
Vector EnginePrediction(CachedEntity* player, float time);
|
||||
void Prediction_CreateMove();
|
||||
#ifndef TEXTMODE
|
||||
void Prediction_PaintTraverse();
|
||||
#endif
|
||||
|
||||
float DistanceToGround(CachedEntity* ent);
|
||||
float DistanceToGround(Vector origin);
|
||||
|
16
src/textmode.cpp
Normal file
16
src/textmode.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* textmode.cpp
|
||||
*
|
||||
* Created on: Jul 28, 2017
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#include "textmode.hpp"
|
||||
|
||||
bool IsTextMode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void PatchVAC() {
|
||||
;
|
||||
}
|
11
src/textmode.hpp
Normal file
11
src/textmode.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
/*
|
||||
* textmode.hpp
|
||||
*
|
||||
* Created on: Jul 28, 2017
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
bool IsTextMode();
|
||||
void PatchVAC();
|
Reference in New Issue
Block a user