commit
3556fe2804
@ -17,6 +17,7 @@ set_property(CACHE Game PROPERTY STRINGS ${GameValues})
|
||||
|
||||
|
||||
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(EnableGUI 1 CACHE BOOL "Enable GUI")
|
||||
set(EnableIPC 1 CACHE BOOL "Enable IPC")
|
||||
|
@ -28,6 +28,8 @@ extern CatVar engine_pred;
|
||||
extern Timer DelayTimer;
|
||||
extern CatVar delay;
|
||||
extern CatVar adjust;
|
||||
extern float prevflow;
|
||||
extern int prevflowticks;
|
||||
#if ENABLE_VISUALS
|
||||
extern int spectator_target;
|
||||
extern CLC_VoiceData *voicecrash;
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define GAME_SPECIFIC @GameSpecific@
|
||||
#define GAME @Game@
|
||||
#define ENABLE_VISUALS @EnableVisuals@
|
||||
#define LAGBOT_MODE @LagbotMode@
|
||||
#define EXTERNAL_DRAWING @ExternalDrawing@
|
||||
#define ENABLE_GUI @EnableGUI@
|
||||
#define ENABLE_IPC @EnableIPC@
|
||||
@ -13,4 +14,4 @@
|
||||
#define ENABLE_VAC_BYPASS @VACBypass@
|
||||
#define ENABLE_TEXTMODE_STDIN @EnableTextmodeStdin@
|
||||
#define ENABLE_NULL_GRAPHICS @EnableNullGraphics@
|
||||
#define TEXTMODE @Textmode@
|
||||
#define TEXTMODE @Textmode@
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
namespace hacks
|
||||
{
|
||||
namespace shared
|
||||
|
@ -8,18 +8,21 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
|
||||
namespace hacks {
|
||||
namespace shared {
|
||||
namespace backtrack {
|
||||
namespace hacks
|
||||
{
|
||||
namespace shared
|
||||
{
|
||||
namespace backtrack
|
||||
{
|
||||
struct BacktrackData
|
||||
{
|
||||
int tickcount;
|
||||
Vector hitboxpos;
|
||||
int tickcount;
|
||||
Vector hitboxpos;
|
||||
};
|
||||
void Init();
|
||||
void Run();
|
||||
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
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Achievement.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}/Walkbot.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Radar.hpp")
|
||||
|
||||
add_subdirectory(ac)
|
||||
endif()
|
||||
if(EnableVisuals)
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ESP.hpp"
|
||||
@ -40,5 +46,3 @@ target_sources(cathook PRIVATE
|
||||
endif()
|
||||
|
||||
target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
add_subdirectory(ac)
|
@ -17,7 +17,7 @@
|
||||
#include "SpyAlert.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
#if not LAGBOT_MODE
|
||||
#include "Aimbot.hpp"
|
||||
#include "AntiAim.hpp"
|
||||
#include "AntiDisguise.hpp"
|
||||
@ -29,11 +29,15 @@
|
||||
#include "AutoDeadringer.hpp"
|
||||
#include "Bunnyhop.hpp"
|
||||
#include "LagExploit.hpp"
|
||||
#endif
|
||||
#if ENABLE_VISUALS
|
||||
#include "Radar.hpp"
|
||||
#endif
|
||||
#if not LAGBOT_MODE
|
||||
#include "Walkbot.hpp"
|
||||
#endif
|
||||
#include "AutoJoin.hpp"
|
||||
#if not LAGBOT_MODE
|
||||
#include "AntiBackstab.hpp"
|
||||
#include "AutoBackstab.hpp"
|
||||
#include "FollowBot.hpp"
|
||||
@ -43,10 +47,15 @@
|
||||
#include "KillSay.hpp"
|
||||
#include "UberSpam.hpp"
|
||||
#include "Achievement.hpp"
|
||||
#endif
|
||||
#include "Spam.hpp"
|
||||
#if not LAGBOT_MODE
|
||||
#include "Noisemaker.hpp"
|
||||
#include "FollowBot.hpp"
|
||||
#include "Announcer.hpp"
|
||||
#include "Killstreak.hpp"
|
||||
#endif
|
||||
#include "CatBot.hpp"
|
||||
#if not LAGBOT_MODE
|
||||
#include "Backtrack.hpp"
|
||||
#endif
|
||||
|
@ -12,5 +12,6 @@ namespace tfmm
|
||||
|
||||
void queue_start();
|
||||
void queue_leave();
|
||||
void dcandabandon();
|
||||
void abandon();
|
||||
}
|
||||
|
@ -39,5 +39,7 @@ Timer DelayTimer{};
|
||||
CatVar delay(
|
||||
CV_INT, "delay", "0", "Delay",
|
||||
"Delay actions like chat spam and serverlag/crash by this many seconds.");
|
||||
CatVar adjust(CV_SWITCH, "serverlag_ramp", "0", "Ramp lag",
|
||||
"increase lag while packet loss is below 80%");
|
||||
CatVar adjust(CV_INT, "serverlag_ramp", "0", "Ramp lag",
|
||||
"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 "hack.hpp"
|
||||
#include "common.hpp"
|
||||
#include "MiscTemporary.hpp"
|
||||
|
||||
#include <hacks/hacklist.hpp>
|
||||
|
||||
@ -381,11 +382,12 @@ free(logname);*/
|
||||
// hooks::materialsystem.HookMethod();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if not LAGBOT_MODE
|
||||
// FIXME [MP]
|
||||
hacks::shared::killsay::Init();
|
||||
hacks::shared::announcer::init();
|
||||
hacks::tf2::killstreak::init();
|
||||
#endif
|
||||
hacks::shared::catbot::init();
|
||||
logging::Info("Hooked!");
|
||||
velocity::Init();
|
||||
@ -416,10 +418,10 @@ free(logname);*/
|
||||
g_IGameEventManager->AddListener(&adv_event_listener, false);
|
||||
|
||||
#endif /* TEXTMODE */
|
||||
|
||||
#if not LAGBOT_MODE
|
||||
hacks::shared::anticheat::Init();
|
||||
hacks::tf2::healarrow::Init();
|
||||
|
||||
#endif
|
||||
#if ENABLE_VISUALS
|
||||
#ifndef FEATURE_FIDGET_SPINNER_ENABLED
|
||||
InitSpinner();
|
||||
@ -429,8 +431,9 @@ free(logname);*/
|
||||
backpacktf::init();
|
||||
logging::Info("Initialized Backpack.TF integration");
|
||||
#endif
|
||||
|
||||
#if not LAGBOT_MODE
|
||||
hacks::shared::walkbot::Initialize();
|
||||
#endif
|
||||
#if ENABLE_VISUALS
|
||||
hacks::shared::esp::Init();
|
||||
#endif
|
||||
@ -467,8 +470,10 @@ void hack::Shutdown()
|
||||
#endif
|
||||
logging::Info("Unregistering convars..");
|
||||
ConVar_Unregister();
|
||||
#if not LAGBOT_MODE
|
||||
logging::Info("Shutting down killsay...");
|
||||
hacks::shared::killsay::Shutdown();
|
||||
hacks::shared::announcer::shutdown();
|
||||
#endif
|
||||
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",
|
||||
"Shoot automatically when the target is locked, isn't "
|
||||
"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");
|
||||
static CatEnum hitbox_mode_enum({ "AUTO", "AUTO-CLOSEST", "STATIC" });
|
||||
static CatVar hitbox_mode(hitbox_mode_enum, "aimbot_hitboxmode", "0",
|
||||
@ -207,9 +207,10 @@ void CreateMove()
|
||||
return;
|
||||
|
||||
if (!g_IEntityList->GetClientEntity(target_entity->m_IDX))
|
||||
return;
|
||||
if (!target_entity->hitboxes.GetHitbox(calculated_data_array[target_entity->m_IDX].hitbox))
|
||||
return;
|
||||
return;
|
||||
if (!target_entity->hitboxes.GetHitbox(
|
||||
calculated_data_array[target_entity->m_IDX].hitbox))
|
||||
return;
|
||||
// Auto-zoom
|
||||
IF_GAME(IsTF())
|
||||
{
|
||||
@ -705,12 +706,12 @@ void Aim(CachedEntity *entity)
|
||||
float minx, maxx, miny, maxy, minz, maxz, centerx, centery, centerz;
|
||||
auto hitbox = entity->hitboxes.GetHitbox(cd.hitbox);
|
||||
// get positions
|
||||
minx = hitbox->min.x;
|
||||
miny = hitbox->min.y;
|
||||
maxx = hitbox->max.x;
|
||||
maxy = hitbox->max.y;
|
||||
minz = hitbox->min.z;
|
||||
maxz = hitbox->max.z;
|
||||
minx = hitbox->min.x;
|
||||
miny = hitbox->min.y;
|
||||
maxx = hitbox->max.x;
|
||||
maxy = hitbox->max.y;
|
||||
minz = hitbox->min.z;
|
||||
maxz = hitbox->max.z;
|
||||
centerx = hitbox->center.x;
|
||||
centery = hitbox->center.y;
|
||||
centerz = hitbox->center.z;
|
||||
@ -724,18 +725,18 @@ void Aim(CachedEntity *entity)
|
||||
maxz -= (maxz - minz) / 6;
|
||||
minz += (maxz - minz) / 6;
|
||||
// Create Vectors
|
||||
positions.push_back({minx, centery, minz});
|
||||
positions.push_back({maxx, centery, minz});
|
||||
positions.push_back({minx, centery, maxz});
|
||||
positions.push_back({maxx, centery, maxz});
|
||||
positions.push_back({centerx, miny, minz});
|
||||
positions.push_back({centerx, maxy, minz});
|
||||
positions.push_back({centerx, miny, maxz});
|
||||
positions.push_back({centerx, maxy, maxz});
|
||||
positions.push_back({minx, miny, centerz});
|
||||
positions.push_back({maxx, maxy, centerz});
|
||||
positions.push_back({minx, miny, centerz});
|
||||
positions.push_back({maxx, maxy, centerz});
|
||||
positions.push_back({ minx, centery, minz });
|
||||
positions.push_back({ maxx, centery, minz });
|
||||
positions.push_back({ minx, centery, maxz });
|
||||
positions.push_back({ maxx, centery, maxz });
|
||||
positions.push_back({ centerx, miny, minz });
|
||||
positions.push_back({ centerx, maxy, minz });
|
||||
positions.push_back({ centerx, miny, maxz });
|
||||
positions.push_back({ centerx, maxy, maxz });
|
||||
positions.push_back({ minx, miny, centerz });
|
||||
positions.push_back({ maxx, maxy, centerz });
|
||||
positions.push_back({ minx, miny, centerz });
|
||||
positions.push_back({ maxx, maxy, centerz });
|
||||
positions.push_back(hitbox->center);
|
||||
for (auto pos : positions)
|
||||
if (IsVectorVisible(g_pLocalPlayer->v_Eye, pos))
|
||||
|
@ -102,6 +102,7 @@ void UpdateSearch()
|
||||
Timer timer{};
|
||||
void Update()
|
||||
{
|
||||
#if not LAGBOT_MODE
|
||||
if (timer.test_and_set(500))
|
||||
{
|
||||
if (autojoin_team and UnassignedTeam())
|
||||
@ -116,6 +117,7 @@ void Update()
|
||||
.c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,128 +7,146 @@
|
||||
|
||||
#include "common.hpp"
|
||||
#include "Backtrack.hpp"
|
||||
namespace hacks {
|
||||
namespace shared {
|
||||
namespace backtrack {
|
||||
CatVar enable(CV_SWITCH, "backtrack", "0", "Enable backtrack", "For legit play only as of right now.");
|
||||
BacktrackData headPositions[24][12];
|
||||
namespace hacks
|
||||
{
|
||||
namespace shared
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
if (TempOffset < 0.000001f)
|
||||
return FLT_MAX;
|
||||
auto TempOffset =
|
||||
PointDir.Dot(Dir) / (Dir.x * Dir.x + Dir.y * Dir.y + Dir.z * Dir.z);
|
||||
if (TempOffset < 0.000001f)
|
||||
return FLT_MAX;
|
||||
|
||||
auto PerpendicularPoint = LineOrigin + (Dir * TempOffset);
|
||||
auto PerpendicularPoint = LineOrigin + (Dir * TempOffset);
|
||||
|
||||
return (Point - PerpendicularPoint).Length();
|
||||
return (Point - PerpendicularPoint).Length();
|
||||
}
|
||||
|
||||
inline Vector angle_vector(Vector meme)
|
||||
{
|
||||
auto sy = sin(meme.y / 180.f * static_cast<float>(PI));
|
||||
auto cy = cos(meme.y / 180.f * static_cast<float>(PI));
|
||||
auto sy = sin(meme.y / 180.f * static_cast<float>(PI));
|
||||
auto cy = cos(meme.y / 180.f * static_cast<float>(PI));
|
||||
|
||||
auto sp = sin(meme.x / 180.f * static_cast<float>(PI));
|
||||
auto cp = cos(meme.x / 180.f* static_cast<float>(PI));
|
||||
auto sp = sin(meme.x / 180.f * static_cast<float>(PI));
|
||||
auto cp = cos(meme.x / 180.f * static_cast<float>(PI));
|
||||
|
||||
return Vector(cp*cy, cp*sy, -sp);
|
||||
return Vector(cp * cy, cp * sy, -sp);
|
||||
}
|
||||
//=======================================================================
|
||||
void Init()
|
||||
{
|
||||
for (auto a : headPositions)
|
||||
{
|
||||
a->hitboxpos = {0,0,0};
|
||||
a->tickcount = 0;
|
||||
}
|
||||
for (auto a : headPositions)
|
||||
{
|
||||
a->hitboxpos = { 0, 0, 0 };
|
||||
a->tickcount = 0;
|
||||
}
|
||||
}
|
||||
bool disabled = true;
|
||||
void Run()
|
||||
{
|
||||
if (!enable)
|
||||
return;
|
||||
CUserCmd *cmd = g_pUserCmd;
|
||||
int iBestTarget = -1;
|
||||
float bestFov = 99999;
|
||||
if (!enable)
|
||||
{
|
||||
if (!disabled)
|
||||
Init();
|
||||
disabled = true;
|
||||
return;
|
||||
}
|
||||
disabled = true;
|
||||
CUserCmd *cmd = g_pUserCmd;
|
||||
int iBestTarget = -1;
|
||||
float bestFov = 99999;
|
||||
|
||||
if (CE_BAD(LOCAL_E))
|
||||
return;
|
||||
if (CE_BAD(LOCAL_E))
|
||||
return;
|
||||
|
||||
for (int i = 1; i <= g_IEngine->GetMaxClients(); i++)
|
||||
{
|
||||
CachedEntity* pEntity = ENTITY(i);
|
||||
for (int i = 1; i <= g_IEngine->GetMaxClients(); i++)
|
||||
{
|
||||
CachedEntity *pEntity = ENTITY(i);
|
||||
|
||||
if (CE_BAD(pEntity))
|
||||
continue;
|
||||
if (!pEntity->m_bAlivePlayer)
|
||||
{
|
||||
for (int j = 0; j < 13; j++) {
|
||||
headPositions[i][j].hitboxpos = {0,0,0};
|
||||
headPositions[i][j].tickcount = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (pEntity->m_iTeam == LOCAL_E->m_iTeam)
|
||||
continue;
|
||||
if (CE_BAD(pEntity))
|
||||
continue;
|
||||
if (!pEntity->m_bAlivePlayer)
|
||||
{
|
||||
for (int j = 0; j < 13; j++)
|
||||
{
|
||||
headPositions[i][j].hitboxpos = { 0, 0, 0 };
|
||||
headPositions[i][j].tickcount = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (pEntity->m_iTeam == LOCAL_E->m_iTeam)
|
||||
continue;
|
||||
|
||||
Vector hitboxpos = pEntity->hitboxes.GetHitbox(0)->center;
|
||||
headPositions[i][cmd->command_number % 13] = BacktrackData{ cmd->tick_count, hitboxpos };
|
||||
Vector hitboxpos = pEntity->hitboxes.GetHitbox(0)->center;
|
||||
headPositions[i][cmd->command_number % 13] =
|
||||
BacktrackData{ cmd->tick_count, hitboxpos };
|
||||
|
||||
Vector ViewDir = angle_vector(cmd->viewangles);
|
||||
float FOVDistance = distance_point_to_line(hitboxpos, g_pLocalPlayer->v_Eye, ViewDir);
|
||||
Vector ViewDir = angle_vector(cmd->viewangles);
|
||||
float FOVDistance =
|
||||
distance_point_to_line(hitboxpos, g_pLocalPlayer->v_Eye, ViewDir);
|
||||
|
||||
if (bestFov > FOVDistance)
|
||||
{
|
||||
bestFov = FOVDistance;
|
||||
iBestTarget = i;
|
||||
}
|
||||
if (bestFov > FOVDistance)
|
||||
{
|
||||
bestFov = FOVDistance;
|
||||
iBestTarget = i;
|
||||
}
|
||||
|
||||
if (iBestTarget != -1)
|
||||
{
|
||||
int bestTick = 0;
|
||||
float tempFOV = 9999;
|
||||
float bestFOV = 30;
|
||||
Vector lowestDistTicks(180, 180, 0);
|
||||
for (int t = 0; t < 12; ++t)
|
||||
{
|
||||
Vector ViewDir = angle_vector(cmd->viewangles);
|
||||
float tempFOV = distance_point_to_line(headPositions[iBestTarget][t].hitboxpos, g_pLocalPlayer->v_Eye, ViewDir);
|
||||
if (bestFOV > tempFOV)
|
||||
bestTick = t, bestFOV = tempFOV;
|
||||
}
|
||||
|
||||
if (cmd->buttons & IN_ATTACK)
|
||||
cmd->tick_count = headPositions[i][bestTick].tickcount;
|
||||
}
|
||||
|
||||
}
|
||||
if (iBestTarget != -1)
|
||||
{
|
||||
int bestTick = 0;
|
||||
float tempFOV = 9999;
|
||||
float bestFOV = 30;
|
||||
Vector lowestDistTicks(180, 180, 0);
|
||||
for (int t = 0; t < 12; ++t)
|
||||
{
|
||||
Vector ViewDir = angle_vector(cmd->viewangles);
|
||||
float tempFOV = distance_point_to_line(
|
||||
headPositions[iBestTarget][t].hitboxpos,
|
||||
g_pLocalPlayer->v_Eye, ViewDir);
|
||||
if (bestFOV > tempFOV)
|
||||
bestTick = t, bestFOV = tempFOV;
|
||||
}
|
||||
|
||||
if (cmd->buttons & IN_ATTACK)
|
||||
cmd->tick_count = headPositions[i][bestTick].tickcount;
|
||||
}
|
||||
}
|
||||
}
|
||||
void Draw()
|
||||
{
|
||||
#if ENABLE_VISUALS
|
||||
if (!enable)
|
||||
return;
|
||||
if (!draw_bt)
|
||||
return;
|
||||
for (int i = 0; i < 24; i++)
|
||||
for (int j = 0; j < 12; j++)
|
||||
{
|
||||
auto hbpos = headPositions[i][j].hitboxpos;
|
||||
auto tickount = headPositions[i][j].tickcount;
|
||||
if (!hbpos.x && !hbpos.y && !hbpos.z)
|
||||
continue;
|
||||
Vector out;
|
||||
rgba_t color = colors::FromHSL(fabs(sin(j / 2.0f)) * 360.0f,
|
||||
0.85f, 0.9f);
|
||||
if (draw::WorldToScreen(hbpos, out))
|
||||
{
|
||||
draw_api::draw_rect(out.x, out.y, 3, 3, color);
|
||||
}
|
||||
auto hbpos = headPositions[i][j].hitboxpos;
|
||||
auto tickount = headPositions[i][j].tickcount;
|
||||
if (!hbpos.x && !hbpos.y && !hbpos.z)
|
||||
continue;
|
||||
Vector out;
|
||||
rgba_t color =
|
||||
colors::FromHSL(fabs(sin(j / 2.0f)) * 360.0f, 0.85f, 0.9f);
|
||||
if (draw::WorldToScreen(hbpos, out))
|
||||
{
|
||||
draw_api::draw_rect(out.x, out.y, 3, 3, color);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
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
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Achievement.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Aimbot.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Announcer.cpp"
|
||||
@ -11,13 +16,11 @@ target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/AutoDetonator.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/AutoEquip.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/AutoHeal.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/AutoJoin.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/AutoReflect.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/AutoSticky.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/AutoTaunt.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Bunnyhop.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Backtrack.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CatBot.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/FollowBot.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/HealArrows.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}/Misc.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Noisemaker.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Spam.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Trigger.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/UberSpam.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Walkbot.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Radar.cpp")
|
||||
|
||||
add_subdirectory(ac)
|
||||
endif()
|
||||
if(EnableVisuals)
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ESP.cpp"
|
||||
@ -38,5 +41,3 @@ if(EnableVisuals)
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SkinChanger.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SpyAlert.cpp")
|
||||
endif()
|
||||
|
||||
add_subdirectory(ac)
|
@ -349,15 +349,18 @@ void CreateMove()
|
||||
|
||||
if (i <= g_IEngine->GetMaxClients())
|
||||
{
|
||||
for (int j = 0; j < 18; ++j)
|
||||
hitboxcache[i][j] = ent->hitboxes.GetHitbox(j);
|
||||
if (draw_bones && ent->m_Type == ENTITY_PLAYER)
|
||||
if (!CE_BAD(ent))
|
||||
{
|
||||
modelcache[i] = RAW_ENT(ent)->GetModel();
|
||||
if (modelcache[i])
|
||||
for (int j = 0; j < 18; ++j)
|
||||
hitboxcache[i][j] = ent->hitboxes.GetHitbox(j);
|
||||
if (draw_bones && ent->m_Type == ENTITY_PLAYER)
|
||||
{
|
||||
stdiocache[i] =
|
||||
g_IModelInfo->GetStudiomodel(modelcache[i]);
|
||||
modelcache[i] = RAW_ENT(ent)->GetModel();
|
||||
if (modelcache[i])
|
||||
{
|
||||
stdiocache[i] =
|
||||
g_IModelInfo->GetStudiomodel(modelcache[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,8 @@ void WorldTick()
|
||||
continue;
|
||||
if (entity->m_Type != ENTITY_PLAYER)
|
||||
continue;
|
||||
if ((int)follow_steam + 18 != entity->player_info.friendsID) // steamid check
|
||||
if ((int) follow_steam + 18 !=
|
||||
entity->player_info.friendsID) // steamid check
|
||||
continue;
|
||||
logging::Info("Success");
|
||||
|
||||
@ -147,7 +148,7 @@ void WorldTick()
|
||||
}
|
||||
}
|
||||
// last check for entity before we continue
|
||||
if (!follow_target)
|
||||
if (!follow_target)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -116,6 +116,7 @@ CatCommand
|
||||
|
||||
void CreateMove()
|
||||
{
|
||||
#if not LAGBOT_MODE
|
||||
// Crithack
|
||||
static IClientEntity *localplayer, *weapon, *last_weapon = nullptr;
|
||||
static int tries, cmdn, md5seed, rseed, c, b;
|
||||
@ -354,6 +355,7 @@ void CreateMove()
|
||||
if (nopush_enabled == pNoPush->GetBool())
|
||||
pNoPush->SetValue(!nopush_enabled);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLE_VISUALS
|
||||
|
@ -82,7 +82,6 @@ std::pair<int, int> WorldToRadar(int x, int y)
|
||||
}
|
||||
bool loaded = false;
|
||||
|
||||
|
||||
textures::texture_atlas texture(DATA_PATH "/res/atlas.png", 1024, 512);
|
||||
|
||||
void DrawEntity(int x, int y, CachedEntity *ent)
|
||||
@ -101,20 +100,21 @@ void DrawEntity(int x, int y, CachedEntity *ent)
|
||||
else if (texture.texture.handle != GLEZ_TEXTURE_INVALID)
|
||||
loaded = true;
|
||||
else
|
||||
return;
|
||||
return;
|
||||
}
|
||||
struct basesprite
|
||||
{
|
||||
textures::sprite sprite = texture.create_sprite(0, 0, 0, 0);
|
||||
textures::sprite sprite = texture.create_sprite(0, 0, 0, 0);
|
||||
};
|
||||
static std::array<std::array<basesprite, 9>, 3> tx_class;
|
||||
static std::array<basesprite, 2> tx_teams;
|
||||
static std::array<basesprite, 2> tx_items;
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int j = 0; j < 9; j++)
|
||||
tx_class[i][j].sprite.setsprite(64 * j, texture.height -64 * (i + 1), 64, 64);
|
||||
for (int j = 0; j < 9; j++)
|
||||
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[1].sprite.setsprite(11 * 64, texture.height -64, 64, 64);
|
||||
tx_teams[1].sprite.setsprite(11 * 64, texture.height - 64, 64, 64);
|
||||
|
||||
tx_items[0].sprite.setsprite(10 * 64, texture.height - 64, 64, 64);
|
||||
tx_items[1].sprite.setsprite(10 * 64, texture.height - 128, 64, 64);
|
||||
|
@ -679,11 +679,8 @@ bool GetProjectileData(CachedEntity *weapon, float &speed, float &gravity)
|
||||
{
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
rspeed = re::C_TFWeaponBaseGun::GetProjectileSpeed(
|
||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
||||
// TODO Wrong grenade launcher gravity
|
||||
rgrav = re::C_TFWeaponBaseGun::GetProjectileGravity(
|
||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
||||
rspeed = 1200.0f;
|
||||
rgrav = 0.4f;
|
||||
}
|
||||
else IF_GAME(IsTF2C())
|
||||
{
|
||||
@ -693,10 +690,13 @@ bool GetProjectileData(CachedEntity *weapon, float &speed, float &gravity)
|
||||
}
|
||||
else if (weapon->m_iClassID == CL_CLASS(CTFCompoundBow))
|
||||
{
|
||||
rspeed = re::C_TFWeaponBaseGun::GetProjectileSpeed(
|
||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
||||
rgrav = re::C_TFWeaponBaseGun::GetProjectileGravity(
|
||||
RAW_ENT(g_pLocalPlayer->weapon()));
|
||||
float chargetime =
|
||||
g_GlobalVars->curtime - CE_FLOAT(weapon, netvar.flChargeBeginTime);
|
||||
rspeed = (float) ((float) (fminf(fmaxf(chargetime, 0.0), 1.0) * 800.0) +
|
||||
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))
|
||||
{
|
||||
|
@ -75,7 +75,6 @@ void RunEnginePrediction(IClientEntity *ent, CUserCmd *ucmd)
|
||||
|
||||
namespace hooked_methods
|
||||
{
|
||||
|
||||
DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
CUserCmd *cmd)
|
||||
{
|
||||
@ -90,7 +89,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
|
||||
tickcount++;
|
||||
g_pUserCmd = cmd;
|
||||
|
||||
#if not LAGBOT_MODE
|
||||
IF_GAME(IsTF2C())
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
ret = original::CreateMove(this_, input_sample_time, cmd);
|
||||
|
||||
PROF_SECTION(CreateMove);
|
||||
@ -192,6 +191,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
hacks::shared::autojoin::Update();
|
||||
|
||||
#if ENABLE_IPC
|
||||
#if not LAGBOT_MODE
|
||||
static int team_joining_state = 0;
|
||||
static float last_jointeam_try = 0;
|
||||
CachedEntity *found_entity, *ent;
|
||||
@ -259,9 +259,11 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (CE_GOOD(g_pLocalPlayer->entity))
|
||||
{
|
||||
#if not LAGBOT_MODE
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
UpdateHoovyList();
|
||||
@ -272,10 +274,12 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
PROF_SECTION(CM_esp);
|
||||
hacks::shared::esp::CreateMove();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
*bSendPackets = true;
|
||||
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon()))
|
||||
{
|
||||
#if not LAGBOT_MODE
|
||||
{
|
||||
PROF_SECTION(CM_walkbot);
|
||||
hacks::shared::walkbot::Move();
|
||||
@ -313,8 +317,8 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
engine_prediction::RunEnginePrediction(RAW_ENT(LOCAL_E),
|
||||
g_pUserCmd);
|
||||
{
|
||||
PROF_SECTION(CM_backtracc);
|
||||
hacks::shared::backtrack::Run();
|
||||
PROF_SECTION(CM_backtracc);
|
||||
hacks::shared::backtrack::Run();
|
||||
}
|
||||
{
|
||||
PROF_SECTION(CM_aimbot);
|
||||
@ -371,7 +375,9 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
if (debug_projectiles)
|
||||
projectile_logging::Update();
|
||||
Prediction_CreateMove();
|
||||
#endif
|
||||
}
|
||||
#if not LAGBOT_MODE
|
||||
{
|
||||
PROF_SECTION(CM_misc);
|
||||
hacks::shared::misc::CreateMove();
|
||||
@ -380,19 +386,23 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
PROF_SECTION(CM_crits);
|
||||
criticals::create_move();
|
||||
}
|
||||
#endif
|
||||
{
|
||||
PROF_SECTION(CM_spam);
|
||||
hacks::shared::spam::CreateMove();
|
||||
}
|
||||
#if not LAGBOT_MODE
|
||||
{
|
||||
PROF_SECTION(CM_AC);
|
||||
angles::Update();
|
||||
hacks::shared::anticheat::CreateMove();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (time_replaced)
|
||||
g_GlobalVars->curtime = curtime_old;
|
||||
g_Settings.bInvalid = false;
|
||||
#if not LAGBOT_MODE
|
||||
{
|
||||
PROF_SECTION(CM_chat_stack);
|
||||
chat_stack::OnCreateMove();
|
||||
@ -405,6 +415,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
PROF_SECTION(CM_lagexploit);
|
||||
hacks::shared::lagexploit::CreateMove();
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO Auto Steam Friend
|
||||
|
||||
@ -419,7 +430,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if not LAGBOT_MODE
|
||||
if (CE_GOOD(g_pLocalPlayer->entity))
|
||||
{
|
||||
static int fakelag_queue = 0;
|
||||
@ -481,6 +492,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
if (cmd)
|
||||
g_Settings.last_angles = cmd->viewangles;
|
||||
}
|
||||
#endif
|
||||
NET_StringCmd senddata(serverlag_string.GetString());
|
||||
INetChannel *ch = (INetChannel *) g_IEngine->GetNetChannelInfo();
|
||||
senddata.SetNetChannel(ch);
|
||||
@ -493,11 +505,24 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
}
|
||||
if (serverlag_amount || votelogger::antikick_ticks)
|
||||
{
|
||||
float latency =
|
||||
g_IEngine->GetNetChannelInfo()->GetAvgPackets(FLOW_INCOMING);
|
||||
logging::Info("%f", latency);
|
||||
if (latency > 200 && adjust)
|
||||
serverlag_amount = (int) serverlag_amount + 1;
|
||||
if (adjust)
|
||||
{
|
||||
if ((int) serverlag_amount == 1)
|
||||
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;
|
||||
prevflowticks = 0;
|
||||
}
|
||||
prevflow = ch->GetAvgData(FLOW_INCOMING);
|
||||
}
|
||||
if (votelogger::antikick_ticks)
|
||||
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) &&
|
||||
hacks::shared::antiaim::communicate)
|
||||
chat_stack::Say("!!meow");
|
||||
#endif
|
||||
if (crypt_chat)
|
||||
{
|
||||
if (message.find("!!") == 0)
|
||||
{
|
||||
if (ucccccp::validate(message))
|
||||
{
|
||||
#if not LAGBOT_MODE
|
||||
if (ucccccp::decrypt(message) == "meow" &&
|
||||
hacks::shared::antiaim::communicate &&
|
||||
data[0] != LOCAL_E->m_IDX &&
|
||||
@ -244,6 +247,7 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
||||
playerlist::k_EState::CAT;
|
||||
chat_stack::Say("!!meow");
|
||||
}
|
||||
#endif
|
||||
PrintChat("\x07%06X%s\x01: %s", 0xe05938, name.c_str(),
|
||||
ucccccp::decrypt(message).c_str());
|
||||
}
|
||||
@ -270,4 +274,4 @@ DEFINE_HOOKED_METHOD(DispatchUserMessage, bool, void *this_, int type,
|
||||
votelogger::user_message(buf, type);
|
||||
return original::DispatchUserMessage(this_, type, buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,9 +82,13 @@ namespace hooked_methods
|
||||
DEFINE_HOOKED_METHOD(LevelInit, void, void *this_, const char *name)
|
||||
{
|
||||
DelayTimer.update();
|
||||
#if not LAGBOT_MODE
|
||||
playerlist::Save();
|
||||
#endif
|
||||
votelogger::antikick_ticks = 0;
|
||||
#if not LAGBOT_MODE
|
||||
hacks::shared::lagexploit::bcalled = false;
|
||||
#endif
|
||||
#if ENABLE_VISUALS
|
||||
typedef bool *(*LoadNamedSkys_Fn)(const char *);
|
||||
uintptr_t addr = gSignatures.GetEngineSignature(
|
||||
@ -110,12 +114,14 @@ DEFINE_HOOKED_METHOD(LevelInit, void, void *this_, const char *name)
|
||||
#endif
|
||||
|
||||
g_IEngine->ClientCmd_Unrestricted("exec cat_matchexec");
|
||||
#if not LAGBOT_MODE
|
||||
hacks::shared::aimbot::Reset();
|
||||
hacks::shared::backtrack::Init();
|
||||
chat_stack::Reset();
|
||||
hacks::shared::anticheat::ResetEverything();
|
||||
original::LevelInit(this_, name);
|
||||
hacks::shared::walkbot::OnLevelInit();
|
||||
#endif
|
||||
#if ENABLE_IPC
|
||||
if (ipc::peer)
|
||||
{
|
||||
|
@ -13,11 +13,15 @@ namespace hooked_methods
|
||||
DEFINE_HOOKED_METHOD(LevelShutdown, void, void *this_)
|
||||
{
|
||||
need_name_change = true;
|
||||
#if not LAGBOT_MODE
|
||||
playerlist::Save();
|
||||
#endif
|
||||
g_Settings.bInvalid = true;
|
||||
#if not LAGBOT_MODE
|
||||
hacks::shared::aimbot::Reset();
|
||||
chat_stack::Reset();
|
||||
hacks::shared::anticheat::ResetEverything();
|
||||
#endif
|
||||
#if ENABLE_IPC
|
||||
if (ipc::peer)
|
||||
{
|
||||
@ -27,4 +31,4 @@ DEFINE_HOOKED_METHOD(LevelShutdown, void, void *this_)
|
||||
#endif
|
||||
return original::LevelShutdown(this_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,9 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
|
||||
|
||||
if (mode & PaintMode_t::PAINT_UIPANELS)
|
||||
{
|
||||
#if not LAGBOT_MODE
|
||||
hacks::tf2::killstreak::apply_killstreaks();
|
||||
#endif
|
||||
hacks::shared::catbot::update();
|
||||
if (hitrate::hitrate_check)
|
||||
{
|
||||
@ -91,4 +93,4 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
|
||||
|
||||
return original::Paint(this_, mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "HookedMethods.hpp"
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
@ -39,7 +39,9 @@ DEFINE_HOOKED_METHOD(Shutdown, void, INetChannel *this_, const char *reason)
|
||||
original::Shutdown(this_, reason);
|
||||
}
|
||||
|
||||
if (autoabandon)
|
||||
tfmm::dcandabandon();
|
||||
if (hacks::shared::autojoin::auto_queue)
|
||||
tfmm::queue_start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void update_mapname()
|
||||
strncpy(data.ingame.mapname, GetLevelName().c_str(),
|
||||
sizeof(data.ingame.mapname));
|
||||
}
|
||||
|
||||
float framerate = 0.0f;
|
||||
void UpdateTemporaryData()
|
||||
{
|
||||
user_data_s &data = peer->memory->peer_user_data[peer->client_id];
|
||||
|
25
src/tfmm.cpp
25
src/tfmm.cpp
@ -53,23 +53,32 @@ void queue_leave()
|
||||
logging::Info("queue_start: CTFPartyClient == null!");
|
||||
}
|
||||
Timer abandont{};
|
||||
CatCommand abandoncmd("disconnect_and_abandon", "Disconnect and abandon", []() {
|
||||
|
||||
void dcandabandon()
|
||||
{
|
||||
re::CTFPartyClient *client = re::CTFPartyClient::GTFPartyClient();
|
||||
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||
if (client)
|
||||
{
|
||||
abandon();
|
||||
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))
|
||||
{
|
||||
queue_leave();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
logging::Info("your party client is gay!");
|
||||
});
|
||||
}
|
||||
CatCommand abandoncmd("disconnect_and_abandon", "Disconnect and abandon",
|
||||
[]() { dcandabandon(); });
|
||||
|
||||
void abandon()
|
||||
{
|
||||
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||
|
@ -140,8 +140,8 @@ void DrawCheatVisuals()
|
||||
}
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
PROF_SECTION(DRAW_backtracc);
|
||||
hacks::shared::backtrack::Draw();
|
||||
PROF_SECTION(DRAW_backtracc);
|
||||
hacks::shared::backtrack::Draw();
|
||||
}
|
||||
IF_GAME(IsTF2())
|
||||
{
|
||||
|
@ -721,6 +721,7 @@ static const std::string list_tf2 = R"(
|
||||
"Backtrack" [
|
||||
"Backtrack Menu"
|
||||
"backtrack"
|
||||
"backtrack_draw"
|
||||
]
|
||||
"Anti Cheat" [
|
||||
"Anti Cheat Menu"
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "common.hpp"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
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 "
|
||||
"be down for about 30 seconds\ncl_timeout 60 is a "
|
||||
"must");
|
||||
int antikick_ticks = 0;
|
||||
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;
|
||||
const std::string tf_classes[] = { "class", "scout", "sniper", "soldier",
|
||||
"demoman", "medic", "heavy", "pyro",
|
||||
"spy", "engineer" };
|
||||
void user_message(bf_read &buffer, int type)
|
||||
{
|
||||
bool islocalplayer = false;
|
||||
@ -47,17 +58,23 @@ void user_message(bf_read &buffer, int type)
|
||||
unsigned steamID = 0;
|
||||
player_info_s info;
|
||||
if (g_IEngine->GetPlayerInfo(eid, &info))
|
||||
{
|
||||
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;
|
||||
if (anti_votekick && !antikick_ticks)
|
||||
{
|
||||
antikick_ticks = 66 * 60;
|
||||
for (int i = 0; i < (int) 70; i++)
|
||||
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
||||
antikick_ticks = 66 * 60;
|
||||
std::string msg = std::to_string(*kick_msg.GetString());
|
||||
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