commit
3556fe2804
@ -17,6 +17,7 @@ set_property(CACHE Game PROPERTY STRINGS ${GameValues})
|
|||||||
|
|
||||||
|
|
||||||
set(EnableVisuals 1 CACHE BOOL "Enable Visuals")
|
set(EnableVisuals 1 CACHE BOOL "Enable Visuals")
|
||||||
|
set(LagbotMode 0 CACHE BOOL "Build light cathook made for lagbots")
|
||||||
set(ExternalDrawing 0 CACHE BOOL "External Visuals")
|
set(ExternalDrawing 0 CACHE BOOL "External Visuals")
|
||||||
set(EnableGUI 1 CACHE BOOL "Enable GUI")
|
set(EnableGUI 1 CACHE BOOL "Enable GUI")
|
||||||
set(EnableIPC 1 CACHE BOOL "Enable IPC")
|
set(EnableIPC 1 CACHE BOOL "Enable IPC")
|
||||||
|
@ -28,6 +28,8 @@ extern CatVar engine_pred;
|
|||||||
extern Timer DelayTimer;
|
extern Timer DelayTimer;
|
||||||
extern CatVar delay;
|
extern CatVar delay;
|
||||||
extern CatVar adjust;
|
extern CatVar adjust;
|
||||||
|
extern float prevflow;
|
||||||
|
extern int prevflowticks;
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
extern int spectator_target;
|
extern int spectator_target;
|
||||||
extern CLC_VoiceData *voicecrash;
|
extern CLC_VoiceData *voicecrash;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#define GAME_SPECIFIC @GameSpecific@
|
#define GAME_SPECIFIC @GameSpecific@
|
||||||
#define GAME @Game@
|
#define GAME @Game@
|
||||||
#define ENABLE_VISUALS @EnableVisuals@
|
#define ENABLE_VISUALS @EnableVisuals@
|
||||||
|
#define LAGBOT_MODE @LagbotMode@
|
||||||
#define EXTERNAL_DRAWING @ExternalDrawing@
|
#define EXTERNAL_DRAWING @ExternalDrawing@
|
||||||
#define ENABLE_GUI @EnableGUI@
|
#define ENABLE_GUI @EnableGUI@
|
||||||
#define ENABLE_IPC @EnableIPC@
|
#define ENABLE_IPC @EnableIPC@
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "common.hpp"
|
||||||
namespace hacks
|
namespace hacks
|
||||||
{
|
{
|
||||||
namespace shared
|
namespace shared
|
||||||
|
@ -8,9 +8,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
|
||||||
namespace hacks {
|
namespace hacks
|
||||||
namespace shared {
|
{
|
||||||
namespace backtrack {
|
namespace shared
|
||||||
|
{
|
||||||
|
namespace backtrack
|
||||||
|
{
|
||||||
struct BacktrackData
|
struct BacktrackData
|
||||||
{
|
{
|
||||||
int tickcount;
|
int tickcount;
|
||||||
@ -19,7 +22,7 @@ struct BacktrackData
|
|||||||
void Init();
|
void Init();
|
||||||
void Run();
|
void Run();
|
||||||
void Draw();
|
void Draw();
|
||||||
extern BacktrackData headPositions[24][12];
|
extern BacktrackData headPositions[24][13];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
target_sources(cathook PRIVATE
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/AutoJoin.hpp"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/CatBot.hpp"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/Spam.hpp")
|
||||||
|
if(NOT LagbotMode)
|
||||||
target_sources(cathook PRIVATE
|
target_sources(cathook PRIVATE
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Achievement.hpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Achievement.hpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Aimbot.hpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Aimbot.hpp"
|
||||||
@ -30,7 +35,8 @@ target_sources(cathook PRIVATE
|
|||||||
"${CMAKE_CURRENT_LIST_DIR}/UberSpam.hpp"
|
"${CMAKE_CURRENT_LIST_DIR}/UberSpam.hpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Walkbot.hpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Walkbot.hpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Radar.hpp")
|
"${CMAKE_CURRENT_LIST_DIR}/Radar.hpp")
|
||||||
|
add_subdirectory(ac)
|
||||||
|
endif()
|
||||||
if(EnableVisuals)
|
if(EnableVisuals)
|
||||||
target_sources(cathook PRIVATE
|
target_sources(cathook PRIVATE
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/ESP.hpp"
|
"${CMAKE_CURRENT_LIST_DIR}/ESP.hpp"
|
||||||
@ -40,5 +46,3 @@ target_sources(cathook PRIVATE
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}")
|
target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
|
|
||||||
add_subdirectory(ac)
|
|
@ -17,7 +17,7 @@
|
|||||||
#include "SpyAlert.hpp"
|
#include "SpyAlert.hpp"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#if not LAGBOT_MODE
|
||||||
#include "Aimbot.hpp"
|
#include "Aimbot.hpp"
|
||||||
#include "AntiAim.hpp"
|
#include "AntiAim.hpp"
|
||||||
#include "AntiDisguise.hpp"
|
#include "AntiDisguise.hpp"
|
||||||
@ -29,11 +29,15 @@
|
|||||||
#include "AutoDeadringer.hpp"
|
#include "AutoDeadringer.hpp"
|
||||||
#include "Bunnyhop.hpp"
|
#include "Bunnyhop.hpp"
|
||||||
#include "LagExploit.hpp"
|
#include "LagExploit.hpp"
|
||||||
|
#endif
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
#include "Radar.hpp"
|
#include "Radar.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
#if not LAGBOT_MODE
|
||||||
#include "Walkbot.hpp"
|
#include "Walkbot.hpp"
|
||||||
|
#endif
|
||||||
#include "AutoJoin.hpp"
|
#include "AutoJoin.hpp"
|
||||||
|
#if not LAGBOT_MODE
|
||||||
#include "AntiBackstab.hpp"
|
#include "AntiBackstab.hpp"
|
||||||
#include "AutoBackstab.hpp"
|
#include "AutoBackstab.hpp"
|
||||||
#include "FollowBot.hpp"
|
#include "FollowBot.hpp"
|
||||||
@ -43,10 +47,15 @@
|
|||||||
#include "KillSay.hpp"
|
#include "KillSay.hpp"
|
||||||
#include "UberSpam.hpp"
|
#include "UberSpam.hpp"
|
||||||
#include "Achievement.hpp"
|
#include "Achievement.hpp"
|
||||||
|
#endif
|
||||||
#include "Spam.hpp"
|
#include "Spam.hpp"
|
||||||
|
#if not LAGBOT_MODE
|
||||||
#include "Noisemaker.hpp"
|
#include "Noisemaker.hpp"
|
||||||
#include "FollowBot.hpp"
|
#include "FollowBot.hpp"
|
||||||
#include "Announcer.hpp"
|
#include "Announcer.hpp"
|
||||||
#include "Killstreak.hpp"
|
#include "Killstreak.hpp"
|
||||||
|
#endif
|
||||||
#include "CatBot.hpp"
|
#include "CatBot.hpp"
|
||||||
|
#if not LAGBOT_MODE
|
||||||
#include "Backtrack.hpp"
|
#include "Backtrack.hpp"
|
||||||
|
#endif
|
||||||
|
@ -12,5 +12,6 @@ namespace tfmm
|
|||||||
|
|
||||||
void queue_start();
|
void queue_start();
|
||||||
void queue_leave();
|
void queue_leave();
|
||||||
|
void dcandabandon();
|
||||||
void abandon();
|
void abandon();
|
||||||
}
|
}
|
||||||
|
@ -39,5 +39,7 @@ Timer DelayTimer{};
|
|||||||
CatVar delay(
|
CatVar delay(
|
||||||
CV_INT, "delay", "0", "Delay",
|
CV_INT, "delay", "0", "Delay",
|
||||||
"Delay actions like chat spam and serverlag/crash by this many seconds.");
|
"Delay actions like chat spam and serverlag/crash by this many seconds.");
|
||||||
CatVar adjust(CV_SWITCH, "serverlag_ramp", "0", "Ramp lag",
|
CatVar adjust(CV_INT, "serverlag_ramp", "0", "Ramp lag",
|
||||||
"increase lag while packet loss is below 80%");
|
"keep lag around this many seconds");
|
||||||
|
float prevflow = 0.0f;
|
||||||
|
int prevflowticks = 0;
|
||||||
|
13
src/hack.cpp
13
src/hack.cpp
@ -8,6 +8,7 @@
|
|||||||
#include <visual/SDLHooks.hpp>
|
#include <visual/SDLHooks.hpp>
|
||||||
#include "hack.hpp"
|
#include "hack.hpp"
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
#include "MiscTemporary.hpp"
|
||||||
|
|
||||||
#include <hacks/hacklist.hpp>
|
#include <hacks/hacklist.hpp>
|
||||||
|
|
||||||
@ -381,11 +382,12 @@ free(logname);*/
|
|||||||
// hooks::materialsystem.HookMethod();
|
// hooks::materialsystem.HookMethod();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if not LAGBOT_MODE
|
||||||
// FIXME [MP]
|
// FIXME [MP]
|
||||||
hacks::shared::killsay::Init();
|
hacks::shared::killsay::Init();
|
||||||
hacks::shared::announcer::init();
|
hacks::shared::announcer::init();
|
||||||
hacks::tf2::killstreak::init();
|
hacks::tf2::killstreak::init();
|
||||||
|
#endif
|
||||||
hacks::shared::catbot::init();
|
hacks::shared::catbot::init();
|
||||||
logging::Info("Hooked!");
|
logging::Info("Hooked!");
|
||||||
velocity::Init();
|
velocity::Init();
|
||||||
@ -416,10 +418,10 @@ free(logname);*/
|
|||||||
g_IGameEventManager->AddListener(&adv_event_listener, false);
|
g_IGameEventManager->AddListener(&adv_event_listener, false);
|
||||||
|
|
||||||
#endif /* TEXTMODE */
|
#endif /* TEXTMODE */
|
||||||
|
#if not LAGBOT_MODE
|
||||||
hacks::shared::anticheat::Init();
|
hacks::shared::anticheat::Init();
|
||||||
hacks::tf2::healarrow::Init();
|
hacks::tf2::healarrow::Init();
|
||||||
|
#endif
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
#ifndef FEATURE_FIDGET_SPINNER_ENABLED
|
#ifndef FEATURE_FIDGET_SPINNER_ENABLED
|
||||||
InitSpinner();
|
InitSpinner();
|
||||||
@ -429,8 +431,9 @@ free(logname);*/
|
|||||||
backpacktf::init();
|
backpacktf::init();
|
||||||
logging::Info("Initialized Backpack.TF integration");
|
logging::Info("Initialized Backpack.TF integration");
|
||||||
#endif
|
#endif
|
||||||
|
#if not LAGBOT_MODE
|
||||||
hacks::shared::walkbot::Initialize();
|
hacks::shared::walkbot::Initialize();
|
||||||
|
#endif
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
hacks::shared::esp::Init();
|
hacks::shared::esp::Init();
|
||||||
#endif
|
#endif
|
||||||
@ -467,8 +470,10 @@ void hack::Shutdown()
|
|||||||
#endif
|
#endif
|
||||||
logging::Info("Unregistering convars..");
|
logging::Info("Unregistering convars..");
|
||||||
ConVar_Unregister();
|
ConVar_Unregister();
|
||||||
|
#if not LAGBOT_MODE
|
||||||
logging::Info("Shutting down killsay...");
|
logging::Info("Shutting down killsay...");
|
||||||
hacks::shared::killsay::Shutdown();
|
hacks::shared::killsay::Shutdown();
|
||||||
hacks::shared::announcer::shutdown();
|
hacks::shared::announcer::shutdown();
|
||||||
|
#endif
|
||||||
logging::Info("Success..");
|
logging::Info("Success..");
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ static CatVar aimkey_mode(aimkey_modes_enum, "aimbot_aimkey_mode", "1",
|
|||||||
static CatVar autoshoot(CV_SWITCH, "aimbot_autoshoot", "1", "Autoshoot",
|
static CatVar autoshoot(CV_SWITCH, "aimbot_autoshoot", "1", "Autoshoot",
|
||||||
"Shoot automatically when the target is locked, isn't "
|
"Shoot automatically when the target is locked, isn't "
|
||||||
"compatible with 'Enable when attacking'");
|
"compatible with 'Enable when attacking'");
|
||||||
static CatVar multipoint(CV_SWITCH, "aimbot_multipoint", "1", "Multipoint",
|
static CatVar multipoint(CV_SWITCH, "aimbot_multipoint", "0", "Multipoint",
|
||||||
"Multipoint aimbot");
|
"Multipoint aimbot");
|
||||||
static CatEnum hitbox_mode_enum({ "AUTO", "AUTO-CLOSEST", "STATIC" });
|
static CatEnum hitbox_mode_enum({ "AUTO", "AUTO-CLOSEST", "STATIC" });
|
||||||
static CatVar hitbox_mode(hitbox_mode_enum, "aimbot_hitboxmode", "0",
|
static CatVar hitbox_mode(hitbox_mode_enum, "aimbot_hitboxmode", "0",
|
||||||
@ -208,7 +208,8 @@ void CreateMove()
|
|||||||
|
|
||||||
if (!g_IEntityList->GetClientEntity(target_entity->m_IDX))
|
if (!g_IEntityList->GetClientEntity(target_entity->m_IDX))
|
||||||
return;
|
return;
|
||||||
if (!target_entity->hitboxes.GetHitbox(calculated_data_array[target_entity->m_IDX].hitbox))
|
if (!target_entity->hitboxes.GetHitbox(
|
||||||
|
calculated_data_array[target_entity->m_IDX].hitbox))
|
||||||
return;
|
return;
|
||||||
// Auto-zoom
|
// Auto-zoom
|
||||||
IF_GAME(IsTF())
|
IF_GAME(IsTF())
|
||||||
|
@ -102,6 +102,7 @@ void UpdateSearch()
|
|||||||
Timer timer{};
|
Timer timer{};
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
#if not LAGBOT_MODE
|
||||||
if (timer.test_and_set(500))
|
if (timer.test_and_set(500))
|
||||||
{
|
{
|
||||||
if (autojoin_team and UnassignedTeam())
|
if (autojoin_team and UnassignedTeam())
|
||||||
@ -116,6 +117,7 @@ void Update()
|
|||||||
.c_str());
|
.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,18 +7,24 @@
|
|||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
#include "Backtrack.hpp"
|
#include "Backtrack.hpp"
|
||||||
namespace hacks {
|
namespace hacks
|
||||||
namespace shared {
|
{
|
||||||
namespace backtrack {
|
namespace shared
|
||||||
CatVar enable(CV_SWITCH, "backtrack", "0", "Enable backtrack", "For legit play only as of right now.");
|
{
|
||||||
BacktrackData headPositions[24][12];
|
namespace backtrack
|
||||||
|
{
|
||||||
|
CatVar enable(CV_SWITCH, "backtrack", "0", "Enable backtrack",
|
||||||
|
"For legit play only as of right now.");
|
||||||
|
extern CatVar draw_bt(CV_SWITCH, "backtrack_draw", "0", "Draw", "Draw backtrack ticks");
|
||||||
|
BacktrackData headPositions[24][13];
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline float distance_point_to_line(Vector Point, Vector LineOrigin, Vector Dir)
|
inline float distance_point_to_line(Vector Point, Vector LineOrigin, Vector Dir)
|
||||||
{
|
{
|
||||||
auto PointDir = Point - LineOrigin;
|
auto PointDir = Point - LineOrigin;
|
||||||
|
|
||||||
auto TempOffset = PointDir.Dot(Dir) / (Dir.x*Dir.x + Dir.y*Dir.y + Dir.z*Dir.z);
|
auto TempOffset =
|
||||||
|
PointDir.Dot(Dir) / (Dir.x * Dir.x + Dir.y * Dir.y + Dir.z * Dir.z);
|
||||||
if (TempOffset < 0.000001f)
|
if (TempOffset < 0.000001f)
|
||||||
return FLT_MAX;
|
return FLT_MAX;
|
||||||
|
|
||||||
@ -46,10 +52,17 @@ void Init()
|
|||||||
a->tickcount = 0;
|
a->tickcount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bool disabled = true;
|
||||||
void Run()
|
void Run()
|
||||||
{
|
{
|
||||||
if (!enable)
|
if (!enable)
|
||||||
|
{
|
||||||
|
if (!disabled)
|
||||||
|
Init();
|
||||||
|
disabled = true;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
disabled = true;
|
||||||
CUserCmd *cmd = g_pUserCmd;
|
CUserCmd *cmd = g_pUserCmd;
|
||||||
int iBestTarget = -1;
|
int iBestTarget = -1;
|
||||||
float bestFov = 99999;
|
float bestFov = 99999;
|
||||||
@ -65,7 +78,8 @@ void Run()
|
|||||||
continue;
|
continue;
|
||||||
if (!pEntity->m_bAlivePlayer)
|
if (!pEntity->m_bAlivePlayer)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 13; j++) {
|
for (int j = 0; j < 13; j++)
|
||||||
|
{
|
||||||
headPositions[i][j].hitboxpos = { 0, 0, 0 };
|
headPositions[i][j].hitboxpos = { 0, 0, 0 };
|
||||||
headPositions[i][j].tickcount = 0;
|
headPositions[i][j].tickcount = 0;
|
||||||
}
|
}
|
||||||
@ -75,10 +89,12 @@ void Run()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
Vector hitboxpos = pEntity->hitboxes.GetHitbox(0)->center;
|
Vector hitboxpos = pEntity->hitboxes.GetHitbox(0)->center;
|
||||||
headPositions[i][cmd->command_number % 13] = BacktrackData{ cmd->tick_count, hitboxpos };
|
headPositions[i][cmd->command_number % 13] =
|
||||||
|
BacktrackData{ cmd->tick_count, hitboxpos };
|
||||||
|
|
||||||
Vector ViewDir = angle_vector(cmd->viewangles);
|
Vector ViewDir = angle_vector(cmd->viewangles);
|
||||||
float FOVDistance = distance_point_to_line(hitboxpos, g_pLocalPlayer->v_Eye, ViewDir);
|
float FOVDistance =
|
||||||
|
distance_point_to_line(hitboxpos, g_pLocalPlayer->v_Eye, ViewDir);
|
||||||
|
|
||||||
if (bestFov > FOVDistance)
|
if (bestFov > FOVDistance)
|
||||||
{
|
{
|
||||||
@ -95,7 +111,9 @@ void Run()
|
|||||||
for (int t = 0; t < 12; ++t)
|
for (int t = 0; t < 12; ++t)
|
||||||
{
|
{
|
||||||
Vector ViewDir = angle_vector(cmd->viewangles);
|
Vector ViewDir = angle_vector(cmd->viewangles);
|
||||||
float tempFOV = distance_point_to_line(headPositions[iBestTarget][t].hitboxpos, g_pLocalPlayer->v_Eye, ViewDir);
|
float tempFOV = distance_point_to_line(
|
||||||
|
headPositions[iBestTarget][t].hitboxpos,
|
||||||
|
g_pLocalPlayer->v_Eye, ViewDir);
|
||||||
if (bestFOV > tempFOV)
|
if (bestFOV > tempFOV)
|
||||||
bestTick = t, bestFOV = tempFOV;
|
bestTick = t, bestFOV = tempFOV;
|
||||||
}
|
}
|
||||||
@ -103,13 +121,15 @@ void Run()
|
|||||||
if (cmd->buttons & IN_ATTACK)
|
if (cmd->buttons & IN_ATTACK)
|
||||||
cmd->tick_count = headPositions[i][bestTick].tickcount;
|
cmd->tick_count = headPositions[i][bestTick].tickcount;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void Draw()
|
void Draw()
|
||||||
{
|
{
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
|
if (!enable)
|
||||||
|
return;
|
||||||
|
if (!draw_bt)
|
||||||
|
return;
|
||||||
for (int i = 0; i < 24; i++)
|
for (int i = 0; i < 24; i++)
|
||||||
for (int j = 0; j < 12; j++)
|
for (int j = 0; j < 12; j++)
|
||||||
{
|
{
|
||||||
@ -118,8 +138,8 @@ void Draw()
|
|||||||
if (!hbpos.x && !hbpos.y && !hbpos.z)
|
if (!hbpos.x && !hbpos.y && !hbpos.z)
|
||||||
continue;
|
continue;
|
||||||
Vector out;
|
Vector out;
|
||||||
rgba_t color = colors::FromHSL(fabs(sin(j / 2.0f)) * 360.0f,
|
rgba_t color =
|
||||||
0.85f, 0.9f);
|
colors::FromHSL(fabs(sin(j / 2.0f)) * 360.0f, 0.85f, 0.9f);
|
||||||
if (draw::WorldToScreen(hbpos, out))
|
if (draw::WorldToScreen(hbpos, out))
|
||||||
{
|
{
|
||||||
draw_api::draw_rect(out.x, out.y, 3, 3, color);
|
draw_api::draw_rect(out.x, out.y, 3, 3, color);
|
||||||
@ -130,5 +150,3 @@ void Draw()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
target_sources(cathook PRIVATE
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/AutoJoin.cpp"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/CatBot.cpp"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/Spam.cpp")
|
||||||
|
if(NOT LagbotMode)
|
||||||
target_sources(cathook PRIVATE
|
target_sources(cathook PRIVATE
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Achievement.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Achievement.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Aimbot.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Aimbot.cpp"
|
||||||
@ -11,13 +16,11 @@ target_sources(cathook PRIVATE
|
|||||||
"${CMAKE_CURRENT_LIST_DIR}/AutoDetonator.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/AutoDetonator.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/AutoEquip.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/AutoEquip.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/AutoHeal.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/AutoHeal.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/AutoJoin.cpp"
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/AutoReflect.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/AutoReflect.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/AutoSticky.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/AutoSticky.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/AutoTaunt.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/AutoTaunt.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Bunnyhop.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Bunnyhop.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Backtrack.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Backtrack.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/CatBot.cpp"
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/FollowBot.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/FollowBot.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/HealArrows.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/HealArrows.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/KillSay.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/KillSay.cpp"
|
||||||
@ -25,12 +28,12 @@ target_sources(cathook PRIVATE
|
|||||||
"${CMAKE_CURRENT_LIST_DIR}/LagExploit.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/LagExploit.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Misc.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Misc.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Noisemaker.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Noisemaker.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Spam.cpp"
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Trigger.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Trigger.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/UberSpam.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/UberSpam.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Walkbot.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/Walkbot.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/Radar.cpp")
|
"${CMAKE_CURRENT_LIST_DIR}/Radar.cpp")
|
||||||
|
add_subdirectory(ac)
|
||||||
|
endif()
|
||||||
if(EnableVisuals)
|
if(EnableVisuals)
|
||||||
target_sources(cathook PRIVATE
|
target_sources(cathook PRIVATE
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/ESP.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/ESP.cpp"
|
||||||
@ -38,5 +41,3 @@ if(EnableVisuals)
|
|||||||
"${CMAKE_CURRENT_LIST_DIR}/SkinChanger.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/SkinChanger.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/SpyAlert.cpp")
|
"${CMAKE_CURRENT_LIST_DIR}/SpyAlert.cpp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(ac)
|
|
@ -348,6 +348,8 @@ void CreateMove()
|
|||||||
ProcessEntity(ent);
|
ProcessEntity(ent);
|
||||||
|
|
||||||
if (i <= g_IEngine->GetMaxClients())
|
if (i <= g_IEngine->GetMaxClients())
|
||||||
|
{
|
||||||
|
if (!CE_BAD(ent))
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 18; ++j)
|
for (int j = 0; j < 18; ++j)
|
||||||
hitboxcache[i][j] = ent->hitboxes.GetHitbox(j);
|
hitboxcache[i][j] = ent->hitboxes.GetHitbox(j);
|
||||||
@ -361,6 +363,7 @@ void CreateMove()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Dont know what this check is for
|
// Dont know what this check is for
|
||||||
if (data[i].string_count)
|
if (data[i].string_count)
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,8 @@ void WorldTick()
|
|||||||
continue;
|
continue;
|
||||||
if (entity->m_Type != ENTITY_PLAYER)
|
if (entity->m_Type != ENTITY_PLAYER)
|
||||||
continue;
|
continue;
|
||||||
if ((int)follow_steam + 18 != entity->player_info.friendsID) // steamid check
|
if ((int) follow_steam + 18 !=
|
||||||
|
entity->player_info.friendsID) // steamid check
|
||||||
continue;
|
continue;
|
||||||
logging::Info("Success");
|
logging::Info("Success");
|
||||||
|
|
||||||
|
@ -116,6 +116,7 @@ CatCommand
|
|||||||
|
|
||||||
void CreateMove()
|
void CreateMove()
|
||||||
{
|
{
|
||||||
|
#if not LAGBOT_MODE
|
||||||
// Crithack
|
// Crithack
|
||||||
static IClientEntity *localplayer, *weapon, *last_weapon = nullptr;
|
static IClientEntity *localplayer, *weapon, *last_weapon = nullptr;
|
||||||
static int tries, cmdn, md5seed, rseed, c, b;
|
static int tries, cmdn, md5seed, rseed, c, b;
|
||||||
@ -354,6 +355,7 @@ void CreateMove()
|
|||||||
if (nopush_enabled == pNoPush->GetBool())
|
if (nopush_enabled == pNoPush->GetBool())
|
||||||
pNoPush->SetValue(!nopush_enabled);
|
pNoPush->SetValue(!nopush_enabled);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
|
@ -82,7 +82,6 @@ std::pair<int, int> WorldToRadar(int x, int y)
|
|||||||
}
|
}
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
|
|
||||||
|
|
||||||
textures::texture_atlas texture(DATA_PATH "/res/atlas.png", 1024, 512);
|
textures::texture_atlas texture(DATA_PATH "/res/atlas.png", 1024, 512);
|
||||||
|
|
||||||
void DrawEntity(int x, int y, CachedEntity *ent)
|
void DrawEntity(int x, int y, CachedEntity *ent)
|
||||||
@ -112,7 +111,8 @@ void DrawEntity(int x, int y, CachedEntity *ent)
|
|||||||
static std::array<basesprite, 2> tx_items;
|
static std::array<basesprite, 2> tx_items;
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
for (int j = 0; j < 9; j++)
|
for (int j = 0; j < 9; j++)
|
||||||
tx_class[i][j].sprite.setsprite(64 * j, texture.height -64 * (i + 1), 64, 64);
|
tx_class[i][j].sprite.setsprite(
|
||||||
|
64 * j, texture.height - 64 * (i + 1), 64, 64);
|
||||||
tx_teams[0].sprite.setsprite(11 * 64, texture.height - 128, 64, 64);
|
tx_teams[0].sprite.setsprite(11 * 64, texture.height - 128, 64, 64);
|
||||||
tx_teams[1].sprite.setsprite(11 * 64, texture.height - 64, 64, 64);
|
tx_teams[1].sprite.setsprite(11 * 64, texture.height - 64, 64, 64);
|
||||||
|
|
||||||
|
@ -679,11 +679,8 @@ bool GetProjectileData(CachedEntity *weapon, float &speed, float &gravity)
|
|||||||
{
|
{
|
||||||
IF_GAME(IsTF2())
|
IF_GAME(IsTF2())
|
||||||
{
|
{
|
||||||
rspeed = re::C_TFWeaponBaseGun::GetProjectileSpeed(
|
rspeed = 1200.0f;
|
||||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
rgrav = 0.4f;
|
||||||
// TODO Wrong grenade launcher gravity
|
|
||||||
rgrav = re::C_TFWeaponBaseGun::GetProjectileGravity(
|
|
||||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
|
||||||
}
|
}
|
||||||
else IF_GAME(IsTF2C())
|
else IF_GAME(IsTF2C())
|
||||||
{
|
{
|
||||||
@ -693,10 +690,13 @@ bool GetProjectileData(CachedEntity *weapon, float &speed, float &gravity)
|
|||||||
}
|
}
|
||||||
else if (weapon->m_iClassID == CL_CLASS(CTFCompoundBow))
|
else if (weapon->m_iClassID == CL_CLASS(CTFCompoundBow))
|
||||||
{
|
{
|
||||||
rspeed = re::C_TFWeaponBaseGun::GetProjectileSpeed(
|
float chargetime =
|
||||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
g_GlobalVars->curtime - CE_FLOAT(weapon, netvar.flChargeBeginTime);
|
||||||
rgrav = re::C_TFWeaponBaseGun::GetProjectileGravity(
|
rspeed = (float) ((float) (fminf(fmaxf(chargetime, 0.0), 1.0) * 800.0) +
|
||||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
1800.0);
|
||||||
|
rgrav = (float) ((float) (fminf(fmaxf(chargetime, 0.0), 1.0) *
|
||||||
|
-0.40000001) +
|
||||||
|
0.5);
|
||||||
}
|
}
|
||||||
else if (weapon->m_iClassID == CL_CLASS(CTFBat_Wood))
|
else if (weapon->m_iClassID == CL_CLASS(CTFBat_Wood))
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,6 @@ void RunEnginePrediction(IClientEntity *ent, CUserCmd *ucmd)
|
|||||||
|
|
||||||
namespace hooked_methods
|
namespace hooked_methods
|
||||||
{
|
{
|
||||||
|
|
||||||
DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||||
CUserCmd *cmd)
|
CUserCmd *cmd)
|
||||||
{
|
{
|
||||||
@ -90,7 +89,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
|
|
||||||
tickcount++;
|
tickcount++;
|
||||||
g_pUserCmd = cmd;
|
g_pUserCmd = cmd;
|
||||||
|
#if not LAGBOT_MODE
|
||||||
IF_GAME(IsTF2C())
|
IF_GAME(IsTF2C())
|
||||||
{
|
{
|
||||||
if (CE_GOOD(LOCAL_W) && minigun_jump &&
|
if (CE_GOOD(LOCAL_W) && minigun_jump &&
|
||||||
@ -99,7 +98,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
CE_INT(LOCAL_W, netvar.iWeaponState) = 0;
|
CE_INT(LOCAL_W, netvar.iWeaponState) = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ret = original::CreateMove(this_, input_sample_time, cmd);
|
ret = original::CreateMove(this_, input_sample_time, cmd);
|
||||||
|
|
||||||
PROF_SECTION(CreateMove);
|
PROF_SECTION(CreateMove);
|
||||||
@ -192,6 +191,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
hacks::shared::autojoin::Update();
|
hacks::shared::autojoin::Update();
|
||||||
|
|
||||||
#if ENABLE_IPC
|
#if ENABLE_IPC
|
||||||
|
#if not LAGBOT_MODE
|
||||||
static int team_joining_state = 0;
|
static int team_joining_state = 0;
|
||||||
static float last_jointeam_try = 0;
|
static float last_jointeam_try = 0;
|
||||||
CachedEntity *found_entity, *ent;
|
CachedEntity *found_entity, *ent;
|
||||||
@ -259,9 +259,11 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
if (CE_GOOD(g_pLocalPlayer->entity))
|
if (CE_GOOD(g_pLocalPlayer->entity))
|
||||||
{
|
{
|
||||||
|
#if not LAGBOT_MODE
|
||||||
IF_GAME(IsTF2())
|
IF_GAME(IsTF2())
|
||||||
{
|
{
|
||||||
UpdateHoovyList();
|
UpdateHoovyList();
|
||||||
@ -272,10 +274,12 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
PROF_SECTION(CM_esp);
|
PROF_SECTION(CM_esp);
|
||||||
hacks::shared::esp::CreateMove();
|
hacks::shared::esp::CreateMove();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
*bSendPackets = true;
|
*bSendPackets = true;
|
||||||
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon()))
|
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon()))
|
||||||
{
|
{
|
||||||
|
#if not LAGBOT_MODE
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_walkbot);
|
PROF_SECTION(CM_walkbot);
|
||||||
hacks::shared::walkbot::Move();
|
hacks::shared::walkbot::Move();
|
||||||
@ -371,7 +375,9 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
if (debug_projectiles)
|
if (debug_projectiles)
|
||||||
projectile_logging::Update();
|
projectile_logging::Update();
|
||||||
Prediction_CreateMove();
|
Prediction_CreateMove();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#if not LAGBOT_MODE
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_misc);
|
PROF_SECTION(CM_misc);
|
||||||
hacks::shared::misc::CreateMove();
|
hacks::shared::misc::CreateMove();
|
||||||
@ -380,19 +386,23 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
PROF_SECTION(CM_crits);
|
PROF_SECTION(CM_crits);
|
||||||
criticals::create_move();
|
criticals::create_move();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_spam);
|
PROF_SECTION(CM_spam);
|
||||||
hacks::shared::spam::CreateMove();
|
hacks::shared::spam::CreateMove();
|
||||||
}
|
}
|
||||||
|
#if not LAGBOT_MODE
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_AC);
|
PROF_SECTION(CM_AC);
|
||||||
angles::Update();
|
angles::Update();
|
||||||
hacks::shared::anticheat::CreateMove();
|
hacks::shared::anticheat::CreateMove();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (time_replaced)
|
if (time_replaced)
|
||||||
g_GlobalVars->curtime = curtime_old;
|
g_GlobalVars->curtime = curtime_old;
|
||||||
g_Settings.bInvalid = false;
|
g_Settings.bInvalid = false;
|
||||||
|
#if not LAGBOT_MODE
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_chat_stack);
|
PROF_SECTION(CM_chat_stack);
|
||||||
chat_stack::OnCreateMove();
|
chat_stack::OnCreateMove();
|
||||||
@ -405,6 +415,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
PROF_SECTION(CM_lagexploit);
|
PROF_SECTION(CM_lagexploit);
|
||||||
hacks::shared::lagexploit::CreateMove();
|
hacks::shared::lagexploit::CreateMove();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// TODO Auto Steam Friend
|
// TODO Auto Steam Friend
|
||||||
|
|
||||||
@ -419,7 +430,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if not LAGBOT_MODE
|
||||||
if (CE_GOOD(g_pLocalPlayer->entity))
|
if (CE_GOOD(g_pLocalPlayer->entity))
|
||||||
{
|
{
|
||||||
static int fakelag_queue = 0;
|
static int fakelag_queue = 0;
|
||||||
@ -481,6 +492,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
if (cmd)
|
if (cmd)
|
||||||
g_Settings.last_angles = cmd->viewangles;
|
g_Settings.last_angles = cmd->viewangles;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
NET_StringCmd senddata(serverlag_string.GetString());
|
NET_StringCmd senddata(serverlag_string.GetString());
|
||||||
INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
|
INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
|
||||||
senddata.SetNetChannel(ch);
|
senddata.SetNetChannel(ch);
|
||||||
@ -493,11 +505,24 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
}
|
}
|
||||||
if (serverlag_amount || votelogger::antikick_ticks)
|
if (serverlag_amount || votelogger::antikick_ticks)
|
||||||
{
|
{
|
||||||
float latency =
|
if (adjust)
|
||||||
g_IEngine->GetNetChannelInfo()->GetAvgPackets(FLOW_INCOMING);
|
{
|
||||||
logging::Info("%f", latency);
|
if ((int) serverlag_amount == 1)
|
||||||
if (latency > 200 && adjust)
|
serverlag_amount = (int) serverlag_amount + 10;
|
||||||
|
if (ch->GetAvgData(FLOW_INCOMING) == prevflow)
|
||||||
|
{
|
||||||
|
if (prevflowticks > 66 * (int) adjust)
|
||||||
|
serverlag_amount = (int) serverlag_amount - 1;
|
||||||
|
prevflowticks++;
|
||||||
|
}
|
||||||
|
if (ch->GetAvgData(FLOW_INCOMING) != prevflow)
|
||||||
|
{
|
||||||
|
if (prevflowticks < 66 * (int) adjust)
|
||||||
serverlag_amount = (int) serverlag_amount + 1;
|
serverlag_amount = (int) serverlag_amount + 1;
|
||||||
|
prevflowticks = 0;
|
||||||
|
}
|
||||||
|
prevflow = ch->GetAvgData(FLOW_INCOMING);
|
||||||
|
}
|
||||||
if (votelogger::antikick_ticks)
|
if (votelogger::antikick_ticks)
|
||||||
votelogger::antikick_ticks--;
|
votelogger::antikick_ticks--;
|
||||||
if (votelogger::antikick_ticks)
|
if (votelogger::antikick_ticks)
|
||||||
|
@ -225,15 +225,18 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if not LAGBOT_MODE
|
||||||
if (sendmsg.test_and_set(300000) &&
|
if (sendmsg.test_and_set(300000) &&
|
||||||
hacks::shared::antiaim::communicate)
|
hacks::shared::antiaim::communicate)
|
||||||
chat_stack::Say("!!meow");
|
chat_stack::Say("!!meow");
|
||||||
|
#endif
|
||||||
if (crypt_chat)
|
if (crypt_chat)
|
||||||
{
|
{
|
||||||
if (message.find("!!") == 0)
|
if (message.find("!!") == 0)
|
||||||
{
|
{
|
||||||
if (ucccccp::validate(message))
|
if (ucccccp::validate(message))
|
||||||
{
|
{
|
||||||
|
#if not LAGBOT_MODE
|
||||||
if (ucccccp::decrypt(message) == "meow" &&
|
if (ucccccp::decrypt(message) == "meow" &&
|
||||||
hacks::shared::antiaim::communicate &&
|
hacks::shared::antiaim::communicate &&
|
||||||
data[0] != LOCAL_E->m_IDX &&
|
data[0] != LOCAL_E->m_IDX &&
|
||||||
@ -244,6 +247,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
|||||||
playerlist::k_EState::CAT;
|
playerlist::k_EState::CAT;
|
||||||
chat_stack::Say("!!meow");
|
chat_stack::Say("!!meow");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
PrintChat("\x07%06X%s\x01: %s", 0xe05938, name.c_str(),
|
PrintChat("\x07%06X%s\x01: %s", 0xe05938, name.c_str(),
|
||||||
ucccccp::decrypt(message).c_str());
|
ucccccp::decrypt(message).c_str());
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,13 @@ namespace hooked_methods
|
|||||||
DEFINE_HOOKED_METHOD(LevelInit, void, void *this_, const char *name)
|
DEFINE_HOOKED_METHOD(LevelInit, void, void *this_, const char *name)
|
||||||
{
|
{
|
||||||
DelayTimer.update();
|
DelayTimer.update();
|
||||||
|
#if not LAGBOT_MODE
|
||||||
playerlist::Save();
|
playerlist::Save();
|
||||||
|
#endif
|
||||||
votelogger::antikick_ticks = 0;
|
votelogger::antikick_ticks = 0;
|
||||||
|
#if not LAGBOT_MODE
|
||||||
hacks::shared::lagexploit::bcalled = false;
|
hacks::shared::lagexploit::bcalled = false;
|
||||||
|
#endif
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
typedef bool *(*LoadNamedSkys_Fn)(const char *);
|
typedef bool *(*LoadNamedSkys_Fn)(const char *);
|
||||||
uintptr_t addr = gSignatures.GetEngineSignature(
|
uintptr_t addr = gSignatures.GetEngineSignature(
|
||||||
@ -110,12 +114,14 @@ DEFINE_HOOKED_METHOD(LevelInit, void, void *this_, const char *name)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_IEngine->ClientCmd_Unrestricted("exec cat_matchexec");
|
g_IEngine->ClientCmd_Unrestricted("exec cat_matchexec");
|
||||||
|
#if not LAGBOT_MODE
|
||||||
hacks::shared::aimbot::Reset();
|
hacks::shared::aimbot::Reset();
|
||||||
hacks::shared::backtrack::Init();
|
hacks::shared::backtrack::Init();
|
||||||
chat_stack::Reset();
|
chat_stack::Reset();
|
||||||
hacks::shared::anticheat::ResetEverything();
|
hacks::shared::anticheat::ResetEverything();
|
||||||
original::LevelInit(this_, name);
|
original::LevelInit(this_, name);
|
||||||
hacks::shared::walkbot::OnLevelInit();
|
hacks::shared::walkbot::OnLevelInit();
|
||||||
|
#endif
|
||||||
#if ENABLE_IPC
|
#if ENABLE_IPC
|
||||||
if (ipc::peer)
|
if (ipc::peer)
|
||||||
{
|
{
|
||||||
|
@ -13,11 +13,15 @@ namespace hooked_methods
|
|||||||
DEFINE_HOOKED_METHOD(LevelShutdown, void, void *this_)
|
DEFINE_HOOKED_METHOD(LevelShutdown, void, void *this_)
|
||||||
{
|
{
|
||||||
need_name_change = true;
|
need_name_change = true;
|
||||||
|
#if not LAGBOT_MODE
|
||||||
playerlist::Save();
|
playerlist::Save();
|
||||||
|
#endif
|
||||||
g_Settings.bInvalid = true;
|
g_Settings.bInvalid = true;
|
||||||
|
#if not LAGBOT_MODE
|
||||||
hacks::shared::aimbot::Reset();
|
hacks::shared::aimbot::Reset();
|
||||||
chat_stack::Reset();
|
chat_stack::Reset();
|
||||||
hacks::shared::anticheat::ResetEverything();
|
hacks::shared::anticheat::ResetEverything();
|
||||||
|
#endif
|
||||||
#if ENABLE_IPC
|
#if ENABLE_IPC
|
||||||
if (ipc::peer)
|
if (ipc::peer)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,9 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
|
|||||||
|
|
||||||
if (mode & PaintMode_t::PAINT_UIPANELS)
|
if (mode & PaintMode_t::PAINT_UIPANELS)
|
||||||
{
|
{
|
||||||
|
#if not LAGBOT_MODE
|
||||||
hacks::tf2::killstreak::apply_killstreaks();
|
hacks::tf2::killstreak::apply_killstreaks();
|
||||||
|
#endif
|
||||||
hacks::shared::catbot::update();
|
hacks::shared::catbot::update();
|
||||||
if (hitrate::hitrate_check)
|
if (hitrate::hitrate_check)
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "HookedMethods.hpp"
|
#include "HookedMethods.hpp"
|
||||||
|
|
||||||
static CatVar die_if_vac(CV_SWITCH, "die_if_vac", "0", "Die if VAC banned");
|
static CatVar die_if_vac(CV_SWITCH, "die_if_vac", "0", "Die if VAC banned");
|
||||||
|
static CatVar autoabandon(CV_SWITCH, "cbu_abandon", "0", "Auto abandon");
|
||||||
namespace hooked_methods
|
namespace hooked_methods
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -39,6 +39,8 @@ DEFINE_HOOKED_METHOD(Shutdown, void, INetChannel *this_, const char *reason)
|
|||||||
original::Shutdown(this_, reason);
|
original::Shutdown(this_, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (autoabandon)
|
||||||
|
tfmm::dcandabandon();
|
||||||
if (hacks::shared::autojoin::auto_queue)
|
if (hacks::shared::autojoin::auto_queue)
|
||||||
tfmm::queue_start();
|
tfmm::queue_start();
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ void update_mapname()
|
|||||||
strncpy(data.ingame.mapname, GetLevelName().c_str(),
|
strncpy(data.ingame.mapname, GetLevelName().c_str(),
|
||||||
sizeof(data.ingame.mapname));
|
sizeof(data.ingame.mapname));
|
||||||
}
|
}
|
||||||
|
float framerate = 0.0f;
|
||||||
void UpdateTemporaryData()
|
void UpdateTemporaryData()
|
||||||
{
|
{
|
||||||
user_data_s &data = peer->memory->peer_user_data[peer->client_id];
|
user_data_s &data = peer->memory->peer_user_data[peer->client_id];
|
||||||
|
23
src/tfmm.cpp
23
src/tfmm.cpp
@ -53,23 +53,32 @@ void queue_leave()
|
|||||||
logging::Info("queue_start: CTFPartyClient == null!");
|
logging::Info("queue_start: CTFPartyClient == null!");
|
||||||
}
|
}
|
||||||
Timer abandont{};
|
Timer abandont{};
|
||||||
CatCommand abandoncmd("disconnect_and_abandon", "Disconnect and abandon", []() {
|
|
||||||
|
void dcandabandon()
|
||||||
|
{
|
||||||
re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient();
|
re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient();
|
||||||
|
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||||
if (client)
|
if (client)
|
||||||
{
|
|
||||||
abandon();
|
abandon();
|
||||||
while (1)
|
else
|
||||||
{
|
{
|
||||||
|
logging::Info("your party client is gay!");
|
||||||
|
if (gc)
|
||||||
|
queue_leave();
|
||||||
|
else
|
||||||
|
logging::Info("your gc is gay!");
|
||||||
|
}
|
||||||
|
if (gc && client)
|
||||||
|
while (1)
|
||||||
if (abandont.test_and_set(4000))
|
if (abandont.test_and_set(4000))
|
||||||
{
|
{
|
||||||
queue_leave();
|
queue_leave();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
CatCommand abandoncmd("disconnect_and_abandon", "Disconnect and abandon",
|
||||||
else
|
[]() { dcandabandon(); });
|
||||||
logging::Info("your party client is gay!");
|
|
||||||
});
|
|
||||||
void abandon()
|
void abandon()
|
||||||
{
|
{
|
||||||
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||||
|
@ -721,6 +721,7 @@ static const std::string list_tf2 = R"(
|
|||||||
"Backtrack" [
|
"Backtrack" [
|
||||||
"Backtrack Menu"
|
"Backtrack Menu"
|
||||||
"backtrack"
|
"backtrack"
|
||||||
|
"backtrack_draw"
|
||||||
]
|
]
|
||||||
"Anti Cheat" [
|
"Anti Cheat" [
|
||||||
"Anti Cheat Menu"
|
"Anti Cheat Menu"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
namespace votelogger
|
namespace votelogger
|
||||||
{
|
{
|
||||||
@ -19,7 +20,17 @@ static CatVar anti_votekick(CV_SWITCH, "anti_votekick", "0", "anti-votekick",
|
|||||||
"to enable votelog and that this\nmakes the server "
|
"to enable votelog and that this\nmakes the server "
|
||||||
"be down for about 30 seconds\ncl_timeout 60 is a "
|
"be down for about 30 seconds\ncl_timeout 60 is a "
|
||||||
"must");
|
"must");
|
||||||
|
static CatVar kick_msg(CV_STRING, "anti_votekick_string",
|
||||||
|
"Everyone thank $NAME for initiating the votekick! The "
|
||||||
|
"server will now be shut down!",
|
||||||
|
"anti-votekick message",
|
||||||
|
"Send this message on Votekick attempts against "
|
||||||
|
"you.\n$NAME gets replaced with their name\n$CLASS with "
|
||||||
|
"their class.");
|
||||||
int antikick_ticks = 0;
|
int antikick_ticks = 0;
|
||||||
|
const std::string tf_classes[] = { "class", "scout", "sniper", "soldier",
|
||||||
|
"demoman", "medic", "heavy", "pyro",
|
||||||
|
"spy", "engineer" };
|
||||||
void user_message(bf_read &buffer, int type)
|
void user_message(bf_read &buffer, int type)
|
||||||
{
|
{
|
||||||
bool islocalplayer = false;
|
bool islocalplayer = false;
|
||||||
@ -47,17 +58,23 @@ void user_message(bf_read &buffer, int type)
|
|||||||
unsigned steamID = 0;
|
unsigned steamID = 0;
|
||||||
player_info_s info;
|
player_info_s info;
|
||||||
if (g_IEngine->GetPlayerInfo(eid, &info))
|
if (g_IEngine->GetPlayerInfo(eid, &info))
|
||||||
{
|
|
||||||
steamID = info.friendsID;
|
steamID = info.friendsID;
|
||||||
}
|
if (eid == LOCAL_E->m_IDX ||
|
||||||
if (eid == LOCAL_E->m_IDX)
|
playerlist::AccessData(steamID).state ==
|
||||||
|
playerlist::k_EState::FRIEND)
|
||||||
{
|
{
|
||||||
islocalplayer = true;
|
islocalplayer = true;
|
||||||
if (anti_votekick && !antikick_ticks)
|
if (anti_votekick && !antikick_ticks)
|
||||||
{
|
{
|
||||||
antikick_ticks = 66 * 60;
|
antikick_ticks = 66 * 60;
|
||||||
for (int i = 0; i < (int) 70; i++)
|
std::string msg = std::to_string(*kick_msg.GetString());
|
||||||
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
boost::replace_all(msg, "$NAME", format(info.name));
|
||||||
|
if (CE_GOOD(ENTITY(eid)))
|
||||||
|
{
|
||||||
|
int clz = g_pPlayerResource->GetClass(ENTITY(eid));
|
||||||
|
boost::replace_all(msg, "$CLASS", format(tf_classes[clz]));
|
||||||
|
}
|
||||||
|
chat_stack::Say(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user