From 5b2b83f588f55437e35913ed8aabb72304a74a03 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Fri, 10 Feb 2017 17:05:32 +0300 Subject: [PATCH] before ItemESP+ --- cathook/TODO | 12 +++++------- cathook/src/hacks/Aimbot.cpp | 2 ++ cathook/src/hacks/Aimbot.h | 1 + cathook/src/hacks/Misc.cpp | 18 +++++++++++++++++- cathook/src/hacks/Misc.h | 1 + cathook/src/hooks/BeginFrame.cpp | 3 --- cathook/src/hooks/hookedmethods.h | 4 ++++ cathook/src/hooks/others.cpp | 2 ++ 8 files changed, 32 insertions(+), 11 deletions(-) diff --git a/cathook/TODO b/cathook/TODO index e4bc8993..e02e367e 100644 --- a/cathook/TODO +++ b/cathook/TODO @@ -1,11 +1,11 @@ -Trace Fraction - alias clearcond "host_timescale 300;wait 500;host_timescale 1" alias clearcond_taunt "taunt;wait 50;host_timescale 300;wait 500;host_timescale 1" bind l clearcond_taunt -no fakelag shoot - +TF2C teams +TF2C merc +HL2DM teams + fullbright toggle Hunter Rifle inspect shit @@ -16,10 +16,9 @@ Auto backstab, noise maker spam, kill say, team name spam (pre round team name s Player List dominatesay assistsay worldsay -Huntsman Leg DS esp slow -antinewl switch menu reorder +AutoDetonator MAX -> MIN priority Crit Hack @@ -49,7 +48,6 @@ Engine Prediction An option to ignore taunting enemies AutoSticky improve No AutoShoot when disguised -Cloaked ESP Ambassador bodyshotting No Trigger Mediguns More projectile weapons aimbot (wrap assassin, wrangler, stickybomb, airstrike) diff --git a/cathook/src/hacks/Aimbot.cpp b/cathook/src/hacks/Aimbot.cpp index 1d278582..85604c33 100644 --- a/cathook/src/hacks/Aimbot.cpp +++ b/cathook/src/hacks/Aimbot.cpp @@ -105,6 +105,8 @@ Aimbot::Aimbot() { "If disabled, FOV restrictions apply to current target position"); this->v_bAimAtTeammates = new CatVar(CV_SWITCH, "aimbot_teammates", "0", "Aim at teammates", NULL, "Aim at your own team. Useful for HL2DM"); + //this->v_bAdvancedSapperAim = new CatVar(CV_SWITCH, "aimbot_sapper", "1", "Advanced Sapper Aim", NULL, + // "Aim at buildings while holding sapper"); } bool Aimbot::ShouldAim(CUserCmd* cmd) { diff --git a/cathook/src/hacks/Aimbot.h b/cathook/src/hacks/Aimbot.h index 3a8cb4f7..0e252cd6 100644 --- a/cathook/src/hacks/Aimbot.h +++ b/cathook/src/hacks/Aimbot.h @@ -84,6 +84,7 @@ public: CatVar* v_ePriorityMode; CatVar* v_bProjPredVisibility; CatVar* v_bProjPredFOV; + CatVar* v_bAdvancedSapperAim; }; DECLARE_HACK_SINGLETON(Aimbot); diff --git a/cathook/src/hacks/Misc.cpp b/cathook/src/hacks/Misc.cpp index 16102389..5e7613c8 100644 --- a/cathook/src/hacks/Misc.cpp +++ b/cathook/src/hacks/Misc.cpp @@ -19,6 +19,7 @@ #include "../common.h" #include #include "../sdk.h" +#include "../hooks/hookedmethods.h" #include "../netmessage.h" #include "../copypasted/CSignature.h" @@ -304,6 +305,7 @@ Misc::Misc() { v_bCleanChat = new CatVar(CV_SWITCH, "clean_chat", "1", "Remove newlines from messages", NULL, "Removes newlines from messages, at least it should do that. Might be broken."); if (TF2) c_Schema = CreateConCommand(CON_PREFIX "schema", CC_Misc_Schema, "Load item schema"); if (TF2) v_bDebugCrits = new CatVar(CV_SWITCH, "debug_crits", "0", "???", NULL, "???"); + //if (TF2) v_bHookInspect = new CatVar(CV_SWITCH, "hook_inspect", "0", "Hook CanInspect", NULL, "Once enabled, can't be turned off. cathook can't be unloaded after enabling it"); //interfaces::eventManager->AddListener(&listener, "player_death", false); } @@ -342,6 +344,20 @@ bool canmeleecrit(IClientEntity* weapon) { void Misc::ProcessUserCmd(CUserCmd* cmd) { static bool flswitch = false; + + /*if (TF2 && v_bHookInspect->GetBool()) { + if (CE_GOOD(LOCAL_W)) { + //logging::Info("%i", vfunc(RAW_ENT(LOCAL_W), offCanInspect, 0)(RAW_ENT(LOCAL_W))); + uintptr_t* vtable = *(uintptr_t**)(RAW_ENT(LOCAL_W)); + if (vtable[offCanInspect] != (uintptr_t)CanInspect_hook) { + uintptr_t patch = (uintptr_t)CanInspect_hook; + Patch((void*)((uintptr_t)vtable + offCanInspect * 4), &patch, 4); + //vtable[offCanInspect] = (uintptr_t*)CanInspect_hook; + } + //logging::Info("%i", vfunc(RAW_ENT(LOCAL_W), offCanInspect, 0)(RAW_ENT(LOCAL_W))); + } + } +*/ if (TF2 && v_bDebugCrits->GetBool() && CE_GOOD(LOCAL_W)) { //static uintptr_t helper = gSignatures.GetClientSignature("55 89 E5 81 EC 88 00 00 00 89 5D F4 8B 5D 08 89 75 F8 89 7D FC 31 FF 89 1C 24 E8 ? ? ? ? 85 C0 89 C6 74 0F 8B 00 89 34 24 FF 90 E0 02 00 00 84 C0 75 14 89 F8 8B 5D F4 8B 75 F8 8B 7D FC 89 EC 5D C3"); /*if (interfaces::gvars->curtime - lastcheck >= 1.0f) { @@ -362,7 +378,7 @@ void Misc::ProcessUserCmd(CUserCmd* cmd) { ciac_s = vfunc(RAW_ENT(LOCAL_W), 1836 / 4, 0)(RAW_ENT(LOCAL_W)); lastcheck = interfaces::gvars->curtime; if (ciac_s != 0) { - logging::Info("Attack!!!"); + //logging::Info("Attack!!!"); cmd->buttons = cmd->buttons | IN_ATTACK; AddCenterString(colors::red, "Crit!"); } diff --git a/cathook/src/hacks/Misc.h b/cathook/src/hacks/Misc.h index 64f0995a..6e921e12 100644 --- a/cathook/src/hacks/Misc.h +++ b/cathook/src/hacks/Misc.h @@ -29,6 +29,7 @@ public: CatVar* v_bMinigunJump; // TF2C CatVar* v_bDebugCrits; // TF2C CatVar* v_bAntiAFK; + CatVar* v_bHookInspect; CatVar* v_iFakeLag; //ConVar* v_bDumpEventInfo; ConCommand* c_DumpItemAttributes; diff --git a/cathook/src/hooks/BeginFrame.cpp b/cathook/src/hooks/BeginFrame.cpp index 26cb213f..63a25206 100644 --- a/cathook/src/hooks/BeginFrame.cpp +++ b/cathook/src/hooks/BeginFrame.cpp @@ -11,7 +11,4 @@ void BeginFrame_hook(IStudioRender* _this) { ((BeginFrame_t*)hooks::hkStudioRender->GetMethod(hooks::offBeginFrame))(_this); - if (!g_Settings.bInvalid) - interfaces::debug->AddTextOverlay(LOCAL_E->m_vecOrigin, -1.0f, "AyyLmao"); - } diff --git a/cathook/src/hooks/hookedmethods.h b/cathook/src/hooks/hookedmethods.h index 6714a329..ef08a3f7 100644 --- a/cathook/src/hooks/hookedmethods.h +++ b/cathook/src/hooks/hookedmethods.h @@ -13,6 +13,7 @@ class CUserCmd; class INetMessage; class bf_read; class CViewSetup; +class IClientEntity; typedef bool(CreateMove_t)(void*, float, CUserCmd*); typedef void(PaintTraverse_t)(void*, unsigned int, bool, bool); @@ -26,6 +27,9 @@ typedef void(FrameStageNotify_t)(void*, int); typedef void(LevelInit_t)(void*, const char*); typedef void(LevelShutdown_t)(void*); typedef void(BeginFrame_t)(IStudioRender*); +typedef bool(*CanInspect_t)(IClientEntity*); +bool CanInspect_hook(IClientEntity*); +const unsigned int offCanInspect = 512; void BeginFrame_hook(IStudioRender*); #include "CreateMove.h" diff --git a/cathook/src/hooks/others.cpp b/cathook/src/hooks/others.cpp index bb44334f..3fc17994 100644 --- a/cathook/src/hooks/others.cpp +++ b/cathook/src/hooks/others.cpp @@ -152,6 +152,8 @@ void LevelInit_hook(void* thisptr, const char* newmap) { g_pChatStack->Reset(); } +bool CanInspect_hook(IClientEntity*) { return true; } + void LevelShutdown_hook(void* thisptr) { ((LevelShutdown_t*) hooks::hkClientMode->GetMethod(hooks::offLevelShutdown))(thisptr); g_Settings.bInvalid = true;