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
|
||||||
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
|
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
|
SRC_DIR = src
|
||||||
RES_DIR = res
|
RES_DIR = res
|
||||||
OUT_NAME = libcathook.so
|
|
||||||
TARGET_DIR = bin
|
TARGET_DIR = bin
|
||||||
TARGET = $(TARGET_DIR)/$(OUT_NAME)
|
TARGET = $(TARGET_DIR)/$(OUT_NAME)
|
||||||
SOURCES = $(shell find $(SRC_DIR) -name "*.c*" -print)
|
SOURCES = $(shell find $(SRC_DIR) -name "*.c*" -print)
|
||||||
@ -96,10 +108,26 @@ CXXFLAGS+=$(addprefix -D,$(DEFINES))
|
|||||||
CFLAGS+=$(addprefix -D,$(DEFINES))
|
CFLAGS+=$(addprefix -D,$(DEFINES))
|
||||||
|
|
||||||
CXXFLAGS+=$(INCLUDES)
|
CXXFLAGS+=$(INCLUDES)
|
||||||
CXXFLAGS+=$(shell sdl2-config --cflags)
|
|
||||||
CFLAGS+=$(INCLUDES)
|
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)
|
CFLAGS+=$(shell sdl2-config --cflags)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: clean directories echo
|
.PHONY: clean directories echo
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@ -136,7 +164,7 @@ src/sdk/utlbuffer.o : CFLAGS+=-w
|
|||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
@echo Compiling $<
|
@echo Compiling $<
|
||||||
@$(CXX) $(CXXFLAGS) -c $< -o $@
|
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@echo Compiling $<
|
@echo Compiling $<
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
* Author: nullifiedcat
|
* Author: nullifiedcat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
|
|
||||||
#include "atlas.hpp"
|
#include "atlas.hpp"
|
||||||
|
|
||||||
#include "drawing.h"
|
#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 "averager.hpp"
|
||||||
|
|
||||||
#include "aftercheaders.h"
|
#include "aftercheaders.h"
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <vec234.h>
|
#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 "macros.hpp"
|
||||||
#include "colors.hpp"
|
#include "colors.hpp"
|
||||||
#include "profiler.h"
|
#include "profiler.h"
|
||||||
#include "ftrender.hpp"
|
|
||||||
#include "offsets.hpp"
|
#include "offsets.hpp"
|
||||||
#include "drawing.h"
|
|
||||||
#include "entitycache.h"
|
#include "entitycache.h"
|
||||||
#include "fidgetspinner.hpp"
|
|
||||||
#include "hoovy.hpp"
|
#include "hoovy.hpp"
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
#include "projlogging.hpp"
|
#include "projlogging.hpp"
|
||||||
@ -57,14 +69,12 @@ extern "C" {
|
|||||||
#include "entityhitboxcache.hpp"
|
#include "entityhitboxcache.hpp"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "drawgl.hpp"
|
|
||||||
#include "playerlist.hpp"
|
#include "playerlist.hpp"
|
||||||
#include "interfaces.h"
|
#include "interfaces.h"
|
||||||
#include "EffectGlow.hpp"
|
|
||||||
#include "drawmgr.hpp"
|
|
||||||
#include "localplayer.h"
|
#include "localplayer.h"
|
||||||
#include "conditions.h"
|
#include "conditions.h"
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
#include "targethelper.h"
|
||||||
#include "playerresource.h"
|
#include "playerresource.h"
|
||||||
#include "usercmd.h"
|
#include "usercmd.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
@ -72,13 +82,11 @@ extern "C" {
|
|||||||
#include "netvars.h"
|
#include "netvars.h"
|
||||||
#include "vfunc.h"
|
#include "vfunc.h"
|
||||||
#include "hooks.h"
|
#include "hooks.h"
|
||||||
#include "atlas.hpp"
|
|
||||||
#include "prediction.h"
|
#include "prediction.h"
|
||||||
#include "conditions.h"
|
#include "conditions.h"
|
||||||
#include "itemtypes.h"
|
#include "itemtypes.h"
|
||||||
#include "chatstack.h"
|
#include "chatstack.h"
|
||||||
#include "textfile.h"
|
#include "textfile.h"
|
||||||
#include "EffectChams.hpp"
|
|
||||||
#include "ipc.h"
|
#include "ipc.h"
|
||||||
#include "hooks/hookedmethods.h"
|
#include "hooks/hookedmethods.h"
|
||||||
#include "classinfo/classinfo.hpp"
|
#include "classinfo/classinfo.hpp"
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
* Author: nullifiedcat
|
* Author: nullifiedcat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "sdk.h"
|
#include "sdk.h"
|
||||||
#include "ftrender.hpp"
|
#include "ftrender.hpp"
|
||||||
@ -112,3 +114,4 @@ bool draw::WorldToScreen(const Vector& origin, Vector& screen) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
61
src/hack.cpp
61
src/hack.cpp
@ -40,7 +40,10 @@
|
|||||||
#define STRINGIFY(x) #x
|
#define STRINGIFY(x) #x
|
||||||
#define TO_STRING(x) STRINGIFY(x)
|
#define TO_STRING(x) STRINGIFY(x)
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
#include "ftrender.hpp"
|
#include "ftrender.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "hooks/hookedmethods.h"
|
#include "hooks/hookedmethods.h"
|
||||||
#include "init.hpp"
|
#include "init.hpp"
|
||||||
|
|
||||||
@ -94,6 +97,10 @@ const std::string& hack::GetType() {
|
|||||||
version += " DYNAMIC";
|
version += " DYNAMIC";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TEXTMODE
|
||||||
|
version += " TEXTMODE";
|
||||||
|
#endif
|
||||||
|
|
||||||
version = version.substr(1);
|
version = version.substr(1);
|
||||||
version_set = true;
|
version_set = true;
|
||||||
return version;
|
return version;
|
||||||
@ -105,6 +112,8 @@ std::stack<std::string>& hack::command_stack() {
|
|||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TEXTMODE /* Why would we need colored chat stuff in textmode? */
|
||||||
|
|
||||||
class AdvancedEventListener : public IGameEventListener {
|
class AdvancedEventListener : public IGameEventListener {
|
||||||
public:
|
public:
|
||||||
virtual void FireGameEvent( KeyValues * event) {
|
virtual void FireGameEvent( KeyValues * event) {
|
||||||
@ -136,6 +145,8 @@ public:
|
|||||||
|
|
||||||
AdvancedEventListener adv_event_listener {};
|
AdvancedEventListener adv_event_listener {};
|
||||||
|
|
||||||
|
#endif /* TEXTMODE */
|
||||||
|
|
||||||
void hack::ExecuteCommand(const std::string command) {
|
void hack::ExecuteCommand(const std::string command) {
|
||||||
std::lock_guard<std::mutex> guard(hack::command_stack_mutex);
|
std::lock_guard<std::mutex> guard(hack::command_stack_mutex);
|
||||||
hack::command_stack().push(command);
|
hack::command_stack().push(command);
|
||||||
@ -151,7 +162,9 @@ void hack::CC_Cat(const CCommand& args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void hack::Initialize() {
|
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 = {
|
std::vector<std::string> essential = {
|
||||||
"shaders/v2f-c4f.frag", "shaders/v2f-c4f.vert",
|
"shaders/v2f-c4f.frag", "shaders/v2f-c4f.vert",
|
||||||
@ -167,6 +180,8 @@ void hack::Initialize() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* TEXTMODE */
|
||||||
|
|
||||||
logging::Info("Initializing...");
|
logging::Info("Initializing...");
|
||||||
srand(time(0));
|
srand(time(0));
|
||||||
prctl(PR_SET_DUMPABLE,0,42,42,42);
|
prctl(PR_SET_DUMPABLE,0,42,42,42);
|
||||||
@ -180,6 +195,9 @@ void hack::Initialize() {
|
|||||||
logging::Info("Is CSS? %d", IsCSS());
|
logging::Info("Is CSS? %d", IsCSS());
|
||||||
logging::Info("Is TF? %d", IsTF());
|
logging::Info("Is TF? %d", IsTF());
|
||||||
InitClassTable();
|
InitClassTable();
|
||||||
|
|
||||||
|
#ifndef TEXTMODE /* We don't need medal to flip 100% when running textmode */
|
||||||
|
|
||||||
IF_GAME (IsTF2()) {
|
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);
|
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) {
|
if (mmmf) {
|
||||||
@ -194,23 +212,29 @@ void hack::Initialize() {
|
|||||||
Patch((void*)canInspectSig, (void*)patch, 3);
|
Patch((void*)canInspectSig, (void*)patch, 3);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* TEXTMODE */
|
||||||
|
|
||||||
BeginConVars();
|
BeginConVars();
|
||||||
hack::c_Cat = CreateConCommand(CON_NAME, &hack::CC_Cat, "Info");
|
hack::c_Cat = CreateConCommand(CON_NAME, &hack::CC_Cat, "Info");
|
||||||
g_Settings.Init();
|
g_Settings.Init();
|
||||||
EndConVars();
|
EndConVars();
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
|
|
||||||
draw::Initialize();
|
draw::Initialize();
|
||||||
#if ENABLE_GUI
|
#if ENABLE_GUI
|
||||||
g_pGUI = new CatGUI();
|
g_pGUI = new CatGUI();
|
||||||
g_pGUI->Setup();
|
g_pGUI->Setup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* TEXTMODE */
|
||||||
|
|
||||||
gNetvars.init();
|
gNetvars.init();
|
||||||
InitNetVars();
|
InitNetVars();
|
||||||
g_pLocalPlayer = new LocalPlayer();
|
g_pLocalPlayer = new LocalPlayer();
|
||||||
g_pPlayerResource = new TFPlayerResource();
|
g_pPlayerResource = new TFPlayerResource();
|
||||||
|
|
||||||
/*
|
|
||||||
* TIME FOR HOOKING! wow
|
|
||||||
*/
|
|
||||||
hooks::panel.Set(g_IPanel);
|
hooks::panel.Set(g_IPanel);
|
||||||
hooks::panel.HookMethod((void*)PaintTraverse_hook, offsets::PaintTraverse());
|
hooks::panel.HookMethod((void*)PaintTraverse_hook, offsets::PaintTraverse());
|
||||||
hooks::panel.Apply();
|
hooks::panel.Apply();
|
||||||
@ -222,7 +246,9 @@ void hack::Initialize() {
|
|||||||
}
|
}
|
||||||
hooks::clientmode.Set((void*)clientMode);
|
hooks::clientmode.Set((void*)clientMode);
|
||||||
hooks::clientmode.HookMethod((void*)CreateMove_hook, offsets::CreateMove());
|
hooks::clientmode.HookMethod((void*)CreateMove_hook, offsets::CreateMove());
|
||||||
|
#ifndef TEXTMODE
|
||||||
hooks::clientmode.HookMethod((void*)OverrideView_hook, offsets::OverrideView());
|
hooks::clientmode.HookMethod((void*)OverrideView_hook, offsets::OverrideView());
|
||||||
|
#endif /* TEXTMODE */
|
||||||
hooks::clientmode.HookMethod((void*)LevelInit_hook, offsets::LevelInit());
|
hooks::clientmode.HookMethod((void*)LevelInit_hook, offsets::LevelInit());
|
||||||
hooks::clientmode.HookMethod((void*)LevelShutdown_hook, offsets::LevelShutdown());
|
hooks::clientmode.HookMethod((void*)LevelShutdown_hook, offsets::LevelShutdown());
|
||||||
hooks::clientmode.Apply();
|
hooks::clientmode.Apply();
|
||||||
@ -232,14 +258,18 @@ void hack::Initialize() {
|
|||||||
hooks::client.Set(g_IBaseClient);
|
hooks::client.Set(g_IBaseClient);
|
||||||
hooks::client.HookMethod((void*)FrameStageNotify_hook, offsets::FrameStageNotify());
|
hooks::client.HookMethod((void*)FrameStageNotify_hook, offsets::FrameStageNotify());
|
||||||
hooks::client.HookMethod((void*)DispatchUserMessage_hook, offsets::DispatchUserMessage());
|
hooks::client.HookMethod((void*)DispatchUserMessage_hook, offsets::DispatchUserMessage());
|
||||||
|
#ifndef TEXTMODE
|
||||||
hooks::client.HookMethod((void*)IN_KeyEvent_hook, offsets::IN_KeyEvent());
|
hooks::client.HookMethod((void*)IN_KeyEvent_hook, offsets::IN_KeyEvent());
|
||||||
|
#endif /* TEXTMODE */
|
||||||
hooks::client.Apply();
|
hooks::client.Apply();
|
||||||
hooks::input.Set(g_IInput);
|
hooks::input.Set(g_IInput);
|
||||||
hooks::input.HookMethod((void*)GetUserCmd_hook, offsets::GetUserCmd());
|
hooks::input.HookMethod((void*)GetUserCmd_hook, offsets::GetUserCmd());
|
||||||
hooks::input.Apply();
|
hooks::input.Apply();
|
||||||
|
#ifndef TEXTMODE
|
||||||
hooks::modelrender.Set(g_IVModelRender);
|
hooks::modelrender.Set(g_IVModelRender);
|
||||||
hooks::modelrender.HookMethod((void*)DrawModelExecute_hook, offsets::DrawModelExecute());
|
hooks::modelrender.HookMethod((void*)DrawModelExecute_hook, offsets::DrawModelExecute());
|
||||||
hooks::modelrender.Apply();
|
hooks::modelrender.Apply();
|
||||||
|
#endif /* TEXTMODE */
|
||||||
hooks::steamfriends.Set(g_ISteamFriends);
|
hooks::steamfriends.Set(g_ISteamFriends);
|
||||||
hooks::steamfriends.HookMethod((void*)GetFriendPersonaName_hook, offsets::GetFriendPersonaName());
|
hooks::steamfriends.HookMethod((void*)GetFriendPersonaName_hook, offsets::GetFriendPersonaName());
|
||||||
hooks::steamfriends.Apply();
|
hooks::steamfriends.Apply();
|
||||||
@ -256,18 +286,21 @@ void hack::Initialize() {
|
|||||||
//hooks::hkBaseClientState8->Apply();
|
//hooks::hkBaseClientState8->Apply();
|
||||||
|
|
||||||
// FIXME [MP]
|
// FIXME [MP]
|
||||||
InitStrings();
|
|
||||||
hacks::shared::killsay::Init();
|
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("exec cat_autoexec");
|
||||||
hack::command_stack().push("cat_killsay_reload");
|
hack::command_stack().push("cat_killsay_reload");
|
||||||
hack::command_stack().push("cat_spam_reload");
|
hack::command_stack().push("cat_spam_reload");
|
||||||
logging::Info("Hooked!");
|
logging::Info("Hooked!");
|
||||||
velocity::Init();
|
velocity::Init();
|
||||||
playerlist::Load();
|
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) {
|
if (g_ppScreenSpaceRegistrationHead && g_pScreenSpaceEffects) {
|
||||||
effect_chams::g_pEffectChams = new CScreenSpaceEffectRegistration("_cathook_chams", &effect_chams::g_EffectChams);
|
effect_chams::g_pEffectChams = new CScreenSpaceEffectRegistration("_cathook_chams", &effect_chams::g_EffectChams);
|
||||||
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_chams");
|
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_chams");
|
||||||
@ -275,20 +308,24 @@ void hack::Initialize() {
|
|||||||
effect_glow::g_pEffectGlow = new CScreenSpaceEffectRegistration("_cathook_glow", &effect_glow::g_EffectGlow);
|
effect_glow::g_pEffectGlow = new CScreenSpaceEffectRegistration("_cathook_glow", &effect_glow::g_EffectGlow);
|
||||||
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_glow");
|
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..");
|
logging::Info("SSE enabled..");
|
||||||
DoSDLHooking();
|
DoSDLHooking();
|
||||||
logging::Info("SDL hooking done");
|
logging::Info("SDL hooking done");
|
||||||
g_IGameEventManager->AddListener(&adv_event_listener, false);
|
g_IGameEventManager->AddListener(&adv_event_listener, false);
|
||||||
|
|
||||||
|
#endif /* TEXTMODE */
|
||||||
|
|
||||||
hacks::shared::anticheat::Init();
|
hacks::shared::anticheat::Init();
|
||||||
hacks::tf2::healarrow::Init();
|
hacks::tf2::healarrow::Init();
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
InitSpinner();
|
InitSpinner();
|
||||||
logging::Info("Initialized Fidget Spinner");
|
logging::Info("Initialized Fidget Spinner");
|
||||||
hacks::shared::spam::Init();
|
hacks::shared::spam::Init();
|
||||||
backpacktf::init();
|
backpacktf::init();
|
||||||
logging::Info("Initialized Backpack.TF integration");
|
logging::Info("Initialized Backpack.TF integration");
|
||||||
|
#endif
|
||||||
|
|
||||||
hacks::shared::walkbot::Initialize();
|
hacks::shared::walkbot::Initialize();
|
||||||
|
|
||||||
logging::Info("Clearing initializer stack");
|
logging::Info("Clearing initializer stack");
|
||||||
|
@ -5,36 +5,7 @@
|
|||||||
* Author: nullifiedcat
|
* 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 "../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 {
|
namespace hacks { namespace shared { namespace aimbot {
|
||||||
|
|
||||||
@ -172,8 +143,10 @@ void CreateMove() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
// Set target esp color to pink
|
// Set target esp color to pink
|
||||||
hacks::shared::esp::SetEntityColor(target, colors::pink);
|
hacks::shared::esp::SetEntityColor(target, colors::pink);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Check if player can aim and if aimkey allows aiming
|
// Check if player can aim and if aimkey allows aiming
|
||||||
// We also preform a CanShoot check here per the old canshoot method
|
// We also preform a CanShoot check here per the old canshoot method
|
||||||
@ -992,6 +965,8 @@ void Reset() {
|
|||||||
projectile_mode = false;
|
projectile_mode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
|
|
||||||
// Function called when we need to draw to screen
|
// 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");
|
static CatVar fov_draw(CV_SWITCH, "aimbot_fov_draw", "0", "Draw Fov Ring", "Draws a ring to represent your current aimbot fov");
|
||||||
void DrawText() {
|
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
|
// Functions called by other functions for when certian game calls are run
|
||||||
void CreateMove();
|
void CreateMove();
|
||||||
|
#ifndef TEXTMODE
|
||||||
void DrawText();
|
void DrawText();
|
||||||
|
#endif
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
// Stuff to make storing functions easy
|
// Stuff to make storing functions easy
|
||||||
|
@ -77,6 +77,7 @@ void CreateMove() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Draw() {
|
void Draw() {
|
||||||
|
#ifndef TEXTMODE
|
||||||
if (healarrow) {
|
if (healarrow) {
|
||||||
if ((g_GlobalVars->curtime - healarrow_time) < float(healarrow_timeout)) {
|
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);
|
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);
|
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() {
|
void DrawText() {
|
||||||
if (crit_info && CE_GOOD(LOCAL_W)) {
|
if (crit_info && CE_GOOD(LOCAL_W)) {
|
||||||
if (CritKeyDown() || experimental_crit_hack.KeyDown()) {
|
if (CritKeyDown() || experimental_crit_hack.KeyDown()) {
|
||||||
@ -433,6 +435,8 @@ void DrawText() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void Schema_Reload() {
|
void Schema_Reload() {
|
||||||
logging::Info("Custom schema loading is not supported right now.");
|
logging::Info("Custom schema loading is not supported right now.");
|
||||||
/*
|
/*
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
namespace hacks { namespace shared { namespace misc {
|
namespace hacks { namespace shared { namespace misc {
|
||||||
|
|
||||||
void CreateMove();
|
void CreateMove();
|
||||||
|
#ifndef TEXTMODE
|
||||||
void DrawText();
|
void DrawText();
|
||||||
|
#endif
|
||||||
|
|
||||||
extern IClientEntity* found_crit_weapon;
|
extern IClientEntity* found_crit_weapon;
|
||||||
extern int found_crit_number;
|
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
|
// Draws a single colored connection between 2 nodes
|
||||||
void DrawConnection(index_t a, connection_s& b) {
|
void DrawConnection(index_t a, connection_s& b) {
|
||||||
if (b.free())
|
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() {
|
void DrawPath() {
|
||||||
for (index_t i = 0; i < state::nodes.size(); i++) {
|
for (index_t i = 0; i < state::nodes.size(); i++) {
|
||||||
DrawNode(i, true);
|
DrawNode(i, true);
|
||||||
@ -914,6 +916,8 @@ void Draw() {
|
|||||||
DrawPath();
|
DrawPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void OnLevelInit() {
|
void OnLevelInit() {
|
||||||
if (leave_if_empty && state::state == WB_REPLAYING) {
|
if (leave_if_empty && state::state == WB_REPLAYING) {
|
||||||
nodes.clear();
|
nodes.clear();
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
namespace hacks { namespace shared { namespace walkbot {
|
namespace hacks { namespace shared { namespace walkbot {
|
||||||
|
|
||||||
void Initialize();
|
void Initialize();
|
||||||
|
#ifndef TEXTMODE
|
||||||
void Draw();
|
void Draw();
|
||||||
|
#endif
|
||||||
void Move();
|
void Move();
|
||||||
void OnLevelInit();
|
void OnLevelInit();
|
||||||
|
|
||||||
|
@ -8,6 +8,15 @@
|
|||||||
#ifndef HACKS_HACKLIST_H_
|
#ifndef HACKS_HACKLIST_H_
|
||||||
#define 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 "Aimbot.h"
|
||||||
#include "AntiAim.h"
|
#include "AntiAim.h"
|
||||||
#include "AntiDisguise.h"
|
#include "AntiDisguise.h"
|
||||||
@ -16,7 +25,6 @@
|
|||||||
#include "AutoSticky.h"
|
#include "AutoSticky.h"
|
||||||
#include "AntiCheat.hpp"
|
#include "AntiCheat.hpp"
|
||||||
#include "Bunnyhop.h"
|
#include "Bunnyhop.h"
|
||||||
#include "ESP.h"
|
|
||||||
#include "LagExploit.hpp"
|
#include "LagExploit.hpp"
|
||||||
#include "Walkbot.hpp"
|
#include "Walkbot.hpp"
|
||||||
#include "AutoJoin.hpp"
|
#include "AutoJoin.hpp"
|
||||||
@ -25,15 +33,12 @@
|
|||||||
#include "FollowBot.h"
|
#include "FollowBot.h"
|
||||||
#include "HealArrows.hpp"
|
#include "HealArrows.hpp"
|
||||||
#include "Misc.h"
|
#include "Misc.h"
|
||||||
#include "SpyAlert.h"
|
|
||||||
#include "Trigger.h"
|
#include "Trigger.h"
|
||||||
#include "KillSay.h"
|
#include "KillSay.h"
|
||||||
#include "UberSpam.hpp"
|
#include "UberSpam.hpp"
|
||||||
#include "SkinChanger.hpp"
|
|
||||||
#include "Achievement.h"
|
#include "Achievement.h"
|
||||||
#include "Spam.h"
|
#include "Spam.h"
|
||||||
#include "Noisemaker.h"
|
#include "Noisemaker.h"
|
||||||
#include "FollowBot.h"
|
#include "FollowBot.h"
|
||||||
#include "Radar.hpp"
|
|
||||||
|
|
||||||
#endif /* HACKS_HACKLIST_H_ */
|
#endif /* HACKS_HACKLIST_H_ */
|
||||||
|
@ -264,11 +264,13 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
|||||||
IF_GAME (IsTF2()) {
|
IF_GAME (IsTF2()) {
|
||||||
SAFE_CALL(UpdateHoovyList());
|
SAFE_CALL(UpdateHoovyList());
|
||||||
}
|
}
|
||||||
g_pLocalPlayer->v_OrigViewangles = cmd->viewangles;
|
g_pLocalPlayer->v_OrigViewangles = cmd->viewangles;
|
||||||
|
#ifndef TEXTMODE
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_esp);
|
PROF_SECTION(CM_esp);
|
||||||
SAFE_CALL(hacks::shared::esp::CreateMove());
|
SAFE_CALL(hacks::shared::esp::CreateMove());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon())) {
|
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon())) {
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_walkbot);
|
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();
|
if (!segvcatch::handler_segv) segvcatch::init_fpe();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef TEXTMODE
|
||||||
if (!textures_loaded) {
|
if (!textures_loaded) {
|
||||||
textures_loaded = true;
|
textures_loaded = true;
|
||||||
hacks::tf::radar::Init();
|
hacks::tf::radar::Init();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (pure_bypass) {
|
if (pure_bypass) {
|
||||||
if (!pure_addr) {
|
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);
|
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;
|
if (clean_screenshots && g_IEngine->IsTakingScreenshot()) return;
|
||||||
|
|
||||||
PROF_SECTION(PT_active);
|
PROF_SECTION(PT_active);
|
||||||
|
#ifndef TEXTMODE
|
||||||
draw::UpdateWTS();
|
draw::UpdateWTS();
|
||||||
BeginCheatVisuals();
|
BeginCheatVisuals();
|
||||||
DrawCheatVisuals();
|
DrawCheatVisuals();
|
||||||
@ -151,6 +153,7 @@ void PaintTraverse_hook(void* _this, unsigned int vp, bool fr, bool ar) {
|
|||||||
|
|
||||||
|
|
||||||
EndCheatVisuals();
|
EndCheatVisuals();
|
||||||
|
#endif
|
||||||
SEGV_END;
|
SEGV_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include "ucccccp.hpp"
|
#include "ucccccp.hpp"
|
||||||
#include "hookedmethods.h"
|
#include "hookedmethods.h"
|
||||||
|
|
||||||
|
#ifndef TEXTMODE
|
||||||
|
|
||||||
static CatVar no_invisibility(CV_SWITCH, "no_invis", "0", "Remove Invisibility", "Useful with chams!");
|
static CatVar no_invisibility(CV_SWITCH, "no_invis", "0", "Remove Invisibility", "Useful with chams!");
|
||||||
|
|
||||||
// This hook isn't used yet!
|
// This hook isn't used yet!
|
||||||
@ -68,6 +70,41 @@ void DrawModelExecute_hook(IVModelRender* _this, const DrawModelState_t& state,
|
|||||||
original(_this, state, info, matrix);
|
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) {
|
bool CanPacket_hook(void* _this) {
|
||||||
const CanPacket_t original = (CanPacket_t)hooks::netchannel.GetMethod(offsets::CanPacket());
|
const CanPacket_t original = (CanPacket_t)hooks::netchannel.GetMethod(offsets::CanPacket());
|
||||||
SEGV_BEGIN;
|
SEGV_BEGIN;
|
||||||
@ -96,18 +133,6 @@ CUserCmd* GetUserCmd_hook(IInput* _this, int sequence_number) {
|
|||||||
return def;
|
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 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", []() {
|
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());
|
static const FrameStageNotify_t original = (FrameStageNotify_t)hooks::client.GetMethod(offsets::FrameStageNotify());
|
||||||
SEGV_BEGIN;
|
SEGV_BEGIN;
|
||||||
if (!g_IEngine->IsInGame()) g_Settings.bInvalid = true;
|
if (!g_IEngine->IsInGame()) g_Settings.bInvalid = true;
|
||||||
// TODO hack FSN hook
|
#ifndef TEXTMODE
|
||||||
{
|
{
|
||||||
PROF_SECTION(FSN_skinchanger);
|
PROF_SECTION(FSN_skinchanger);
|
||||||
hacks::tf2::skinchanger::FrameStageNotify(stage);
|
hacks::tf2::skinchanger::FrameStageNotify(stage);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) {
|
if (stage == FRAME_NET_UPDATE_POSTDATAUPDATE_START) {
|
||||||
angles::Update();
|
angles::Update();
|
||||||
hacks::shared::anticheat::CreateMove();
|
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 (cathook && !g_Settings.bInvalid && stage == FRAME_RENDER_START) {
|
||||||
#if ENABLE_GUI
|
#if ENABLE_GUI
|
||||||
if (cursor_fix_experimental) {
|
if (cursor_fix_experimental) {
|
||||||
@ -379,30 +406,11 @@ void FrameStageNotify_hook(void* _this, int stage) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* TEXTMODE */
|
||||||
SAFE_CALL(original(_this, stage));
|
SAFE_CALL(original(_this, stage));
|
||||||
SEGV_END;
|
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 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");
|
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() {
|
void Prediction_PaintTraverse() {
|
||||||
if (!debug_enginepred) return;
|
if (!debug_enginepred) return;
|
||||||
for (int i = 1; i < predicted_player_count; i++) {
|
for (int i = 1; i < predicted_player_count; i++) {
|
||||||
@ -104,7 +104,7 @@ void Prediction_PaintTraverse() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
Vector EnginePrediction(CachedEntity* entity, float time) {
|
Vector EnginePrediction(CachedEntity* entity, float time) {
|
||||||
Vector result = entity->m_vecOrigin;
|
Vector result = entity->m_vecOrigin;
|
||||||
IClientEntity* ent = RAW_ENT(entity);
|
IClientEntity* ent = RAW_ENT(entity);
|
||||||
|
@ -24,7 +24,9 @@ float PlayerGravityMod(CachedEntity* player);
|
|||||||
|
|
||||||
Vector EnginePrediction(CachedEntity* player, float time);
|
Vector EnginePrediction(CachedEntity* player, float time);
|
||||||
void Prediction_CreateMove();
|
void Prediction_CreateMove();
|
||||||
|
#ifndef TEXTMODE
|
||||||
void Prediction_PaintTraverse();
|
void Prediction_PaintTraverse();
|
||||||
|
#endif
|
||||||
|
|
||||||
float DistanceToGround(CachedEntity* ent);
|
float DistanceToGround(CachedEntity* ent);
|
||||||
float DistanceToGround(Vector origin);
|
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