More Modules
This commit is contained in:
parent
26871d2d22
commit
12bd48d741
@ -40,10 +40,6 @@ extern bool foundTarget;
|
||||
extern int target_eid;
|
||||
|
||||
// Functions called by other functions for when certian game calls are run
|
||||
void CreateMove();
|
||||
#if ENABLE_VISUALS
|
||||
void DrawText();
|
||||
#endif
|
||||
void Reset();
|
||||
|
||||
// Stuff to make storing functions easy
|
||||
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* AutoDeadringer.hpp
|
||||
*
|
||||
* Created on: Apr 12, 2018
|
||||
* Author: bencat07
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
namespace hacks::shared::deadringer
|
||||
{
|
||||
|
||||
void CreateMove();
|
||||
}
|
@ -38,8 +38,6 @@ struct BestTickData
|
||||
}
|
||||
};
|
||||
void Init();
|
||||
void Run();
|
||||
void Draw();
|
||||
void AddLatencyToNetchan(INetChannel *, float);
|
||||
void UpdateIncomingSequences();
|
||||
extern int lastincomingsequencenumber;
|
||||
|
@ -1,15 +0,0 @@
|
||||
/*
|
||||
* HBunnyhop.h
|
||||
*
|
||||
* Created on: Oct 6, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
namespace hacks::shared::bunnyhop
|
||||
{
|
||||
void CreateMove();
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Noisemaker.h
|
||||
*
|
||||
* Created on: Feb 2, 2017
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
namespace hacks::tf2::noisemaker
|
||||
{
|
||||
void CreateMove();
|
||||
}
|
@ -12,8 +12,6 @@
|
||||
namespace hacks::tf::uberspam
|
||||
{
|
||||
|
||||
void CreateMove();
|
||||
|
||||
// Ready, Used, Ended, %...
|
||||
|
||||
extern const std::vector<std::string> builtin_cathook;
|
||||
|
@ -25,8 +25,6 @@
|
||||
#include "AutoSticky.hpp"
|
||||
#include "AutoDetonator.hpp"
|
||||
#include "AntiCheat.hpp"
|
||||
#include "AutoDeadringer.hpp"
|
||||
#include "Bunnyhop.hpp"
|
||||
#include "SeedPrediction.hpp"
|
||||
#if ENABLE_VISUALS
|
||||
#include "Radar.hpp"
|
||||
@ -45,7 +43,6 @@
|
||||
#include "Achievement.hpp"
|
||||
#include "Spam.hpp"
|
||||
#include "NavBot.hpp"
|
||||
#include "Noisemaker.hpp"
|
||||
#include "FollowBot.hpp"
|
||||
#include "Announcer.hpp"
|
||||
#include "Killstreak.hpp"
|
||||
|
@ -100,12 +100,13 @@ Timer zoomTime{};
|
||||
// for current frame, to avoid performing them again
|
||||
AimbotCalculatedData_s calculated_data_array[2048]{};
|
||||
// The main "loop" of the aimbot.
|
||||
void CreateMove()
|
||||
static void CreateMove()
|
||||
{
|
||||
PROF_SECTION(PT_aimbot_cm);
|
||||
if (!enable)
|
||||
return;
|
||||
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer() || CE_BAD(LOCAL_W))
|
||||
return;
|
||||
// Auto-Unzoom
|
||||
if (auto_unzoom)
|
||||
if (g_pLocalPlayer->holding_sniper_rifle && g_pLocalPlayer->bZoomed && zoomTime.test_and_set(3000))
|
||||
@ -1227,7 +1228,7 @@ void Reset()
|
||||
}
|
||||
|
||||
#if ENABLE_VISUALS
|
||||
void DrawText()
|
||||
static void DrawText()
|
||||
{
|
||||
// Dont draw to screen when aimbot is disabled
|
||||
if (!enable)
|
||||
@ -1276,4 +1277,10 @@ void DrawText()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
static InitRoutine EC([](){
|
||||
EC::Register<EC::CreateMove>(CreateMove, "CM_Aimbot", EC::average);
|
||||
#if ENABLE_VISUALS
|
||||
EC::Register<EC::Draw>(DrawText, "DRAW_Aimbot", EC::average);
|
||||
#endif
|
||||
});
|
||||
} // namespace hacks::shared::aimbot
|
||||
|
@ -36,11 +36,11 @@ int NearbyEntities()
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
void CreateMove()
|
||||
static void CreateMove()
|
||||
{
|
||||
if (!enable)
|
||||
return;
|
||||
if (CE_BAD(LOCAL_E) || CE_BAD(LOCAL_W))
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer() || CE_BAD(LOCAL_W))
|
||||
return;
|
||||
if (g_pLocalPlayer->clazz != tf_spy)
|
||||
return;
|
||||
@ -67,4 +67,7 @@ void CreateMove()
|
||||
current_user_cmd->buttons |= IN_ATTACK2;
|
||||
}
|
||||
}
|
||||
static InitRoutine EC([](){
|
||||
EC::Register<EC::CreateMove>(CreateMove, "AutoDeadringer", EC::average);
|
||||
});
|
||||
} // namespace hacks::shared::deadringer
|
||||
|
@ -79,7 +79,7 @@ int BestTick = 0;
|
||||
int iBestTarget = -1;
|
||||
bool istickvalid[32][66]{};
|
||||
bool istickinvalid[32][66]{};
|
||||
void Run()
|
||||
static void Run()
|
||||
{
|
||||
if (!shouldBacktrack())
|
||||
{
|
||||
@ -88,7 +88,7 @@ void Run()
|
||||
}
|
||||
isBacktrackEnabled = true;
|
||||
|
||||
if (CE_BAD(LOCAL_E) || CE_BAD(LOCAL_W))
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer() || CE_BAD(LOCAL_W))
|
||||
return;
|
||||
if (g_Settings.bInvalid)
|
||||
return;
|
||||
@ -167,7 +167,7 @@ void Run()
|
||||
}
|
||||
}
|
||||
}
|
||||
void Draw()
|
||||
static void Draw()
|
||||
{
|
||||
#if ENABLE_VISUALS
|
||||
if (!isBacktrackEnabled)
|
||||
@ -363,5 +363,10 @@ std::pair<int, int> getBestEntBestTick()
|
||||
}
|
||||
return std::make_pair(bestEnt, bestTick);
|
||||
}
|
||||
|
||||
static InitRoutine EC([](){
|
||||
EC::Register<EC::CreateMove>(Run, "CM_Backtrack", EC::early);
|
||||
#if ENABLE_VISUALS
|
||||
EC::Register<EC::Draw>(Draw, "DRAW_Backtrack", EC::average);
|
||||
#endif
|
||||
});
|
||||
} // namespace hacks::shared::backtrack
|
||||
|
@ -19,8 +19,10 @@ static int ticks_last_jump = 0;
|
||||
// static int perfect_jumps = 0;
|
||||
|
||||
// Function called by game for movement
|
||||
void CreateMove()
|
||||
static void CreateMove()
|
||||
{
|
||||
if (!CE_GOOD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer() || CE_BAD(LOCAL_W))
|
||||
return;
|
||||
// Check user settings if bhop is enabled
|
||||
if (!enable)
|
||||
return;
|
||||
@ -50,4 +52,7 @@ void CreateMove()
|
||||
if (!jump)
|
||||
ticks_last_jump = 0;
|
||||
}
|
||||
static InitRoutine EC([](){
|
||||
EC::Register<EC::CreateMove>(CreateMove, "Bunnyhop", -4);
|
||||
});
|
||||
} // namespace hacks::shared::bunnyhop
|
||||
|
@ -442,7 +442,7 @@ static void draw()
|
||||
static InitRoutine runinit([]() {
|
||||
EC::Register<EC::CreateMove>(cm, "cm_catbot", EC::average);
|
||||
#if ENABLE_VISUALS
|
||||
EC::Register<EC::Draw>(cm, "draw_catbot", EC::average);
|
||||
EC::Register<EC::Draw>(draw, "draw_catbot", EC::average);
|
||||
#endif
|
||||
});
|
||||
} // namespace hacks::shared::catbot
|
||||
|
@ -1446,7 +1446,9 @@ void SetEntityColor(CachedEntity *entity, const rgba_t &color)
|
||||
|
||||
static InitRoutine init([](){
|
||||
EC::Register<EC::CreateMove>(cm, "cm_esp", EC::average);
|
||||
#if ENABLE_VISUALS
|
||||
EC::Register<EC::Draw>(Draw, "draw_esp", EC::average);
|
||||
#endif
|
||||
});
|
||||
|
||||
|
||||
|
@ -81,7 +81,9 @@ void draw()
|
||||
|
||||
static InitRoutine init([](){
|
||||
EC::Register<EC::CreateMove>(cm, "cm_lightesp", EC::average);
|
||||
#if ENABLE_VISUALS
|
||||
EC::Register<EC::Draw>(draw, "draw_lightesp", EC::average);
|
||||
#endif
|
||||
});
|
||||
|
||||
} // namespace hacks::shared::lightesp
|
||||
|
@ -13,9 +13,9 @@ static settings::Bool enable{ "noisemaker-spam.enable", "false" };
|
||||
namespace hacks::tf2::noisemaker
|
||||
{
|
||||
|
||||
void CreateMove()
|
||||
static void CreateMove()
|
||||
{
|
||||
if (enable)
|
||||
if (enable && CE_GOOD(LOCAL_E) && LOCAL_E->m_bAlivePlayer())
|
||||
{
|
||||
if (g_GlobalVars->framecount % 100 == 0)
|
||||
{
|
||||
@ -26,4 +26,8 @@ void CreateMove()
|
||||
}
|
||||
}
|
||||
}
|
||||
static InitRoutine EC([]()
|
||||
{
|
||||
EC::Register<EC::CreateMove>(CreateMove, "Noisemaker", EC::average);
|
||||
});
|
||||
} // namespace hacks::tf2::noisemaker
|
||||
|
@ -56,8 +56,10 @@ int ChargePercentLineIndex(float chargef)
|
||||
return 3 + (charge / cpl);
|
||||
}
|
||||
|
||||
void CreateMove()
|
||||
static void CreateMove()
|
||||
{
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer() || CE_BAD(LOCAL_W))
|
||||
return;
|
||||
if (!GetSource())
|
||||
return;
|
||||
if (LOCAL_W->m_iClassID() != CL_CLASS(CWeaponMedigun))
|
||||
@ -108,6 +110,9 @@ void CreateMove()
|
||||
last_charge = (int) (100.0f * charge);
|
||||
}
|
||||
|
||||
static InitRoutine register_EC([](){
|
||||
EC::Register<EC::CreateMove>(CreateMove, "Uberspam", EC::priority::average);
|
||||
});
|
||||
// Ready, Used, Ended, %...
|
||||
|
||||
const std::vector<std::string> builtin_cathook = { "-> I am charged!", "-> Not a step back! UBERCHARGE USED!", "-> My Ubercharge comes to an end!", "-> I have %i%% of ubercharge!", "-> I have half of the ubercharge!", "-> Ubercharge almost ready! (%i%%)" };
|
||||
|
@ -288,34 +288,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs
|
||||
g_Settings.is_create_move = false;
|
||||
return ret;
|
||||
}
|
||||
IF_GAME(IsTF())
|
||||
{
|
||||
PROF_SECTION(CM_uberspam);
|
||||
hacks::tf::uberspam::CreateMove();
|
||||
}
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
PROF_SECTION(CM_noisemaker);
|
||||
hacks::tf2::noisemaker::CreateMove();
|
||||
}
|
||||
{
|
||||
PROF_SECTION(CM_deadringer);
|
||||
hacks::shared::deadringer::CreateMove();
|
||||
}
|
||||
{
|
||||
PROF_SECTION(CM_bunnyhop);
|
||||
hacks::shared::bunnyhop::CreateMove();
|
||||
}
|
||||
if (engine_pred)
|
||||
engine_prediction::RunEnginePrediction(RAW_ENT(LOCAL_E), current_user_cmd);
|
||||
{
|
||||
PROF_SECTION(CM_backtracc);
|
||||
hacks::shared::backtrack::Run();
|
||||
}
|
||||
{
|
||||
PROF_SECTION(CM_aimbot);
|
||||
hacks::shared::aimbot::CreateMove();
|
||||
}
|
||||
if (current_user_cmd->buttons & IN_ATTACK)
|
||||
++attackticks;
|
||||
else
|
||||
@ -371,11 +343,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs
|
||||
PROF_SECTION(CM_autobackstab);
|
||||
hacks::tf2::autobackstab::CreateMove();
|
||||
}
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
PROF_SECTION(CM_autodeadringer);
|
||||
hacks::shared::deadringer::CreateMove();
|
||||
}
|
||||
if (debug_projectiles)
|
||||
projectile_logging::Update();
|
||||
Prediction_CreateMove();
|
||||
@ -499,6 +466,13 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs
|
||||
g_Settings.is_create_move = false;
|
||||
return ret;
|
||||
}
|
||||
static InitRoutine EngPred([](){
|
||||
EC::Register<EC::CreateMove>([](){
|
||||
if (engine_pred)
|
||||
engine_prediction::RunEnginePrediction(RAW_ENT(LOCAL_E), current_user_cmd);
|
||||
}, "engine_prediction", -3);
|
||||
|
||||
});
|
||||
} // namespace hooked_methods
|
||||
|
||||
/*float o_curtime;
|
||||
|
@ -187,11 +187,6 @@ void DrawCheatVisuals()
|
||||
}
|
||||
if (CE_GOOD(g_pLocalPlayer->entity) && !g_Settings.bInvalid)
|
||||
{
|
||||
PROF_SECTION(PT_total_hacks);
|
||||
{
|
||||
PROF_SECTION(DRAW_aimbot);
|
||||
hacks::shared::aimbot::DrawText();
|
||||
}
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
PROF_SECTION(DRAW_skinchanger);
|
||||
@ -209,11 +204,6 @@ void DrawCheatVisuals()
|
||||
PROF_SECTION(DRAW_autoreflect);
|
||||
hacks::tf::autoreflect::Draw();
|
||||
}
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
PROF_SECTION(DRAW_backtracc);
|
||||
hacks::shared::backtrack::Draw();
|
||||
}
|
||||
{
|
||||
PROF_SECTION(DRAW_walkbot);
|
||||
hacks::shared::walkbot::Draw();
|
||||
|
Reference in New Issue
Block a user