common.hpp and include refactor

This commit is contained in:
TotallyNotElite 2019-10-17 10:29:58 +02:00
parent c84488478a
commit 749f6d8623
26 changed files with 358 additions and 376 deletions

View File

@ -7,69 +7,16 @@
#pragma once
#include "common.hpp"
#include <core/logging.hpp>
#include "mathlib/vector.h"
#include "entitycache.hpp"
namespace angles
{
struct angle_data_s
{
static constexpr size_t count = 16;
inline void push(const Vector &angle)
{
if (not angle.x and not angle.y)
return;
good = true;
angles[angle_index] = angle;
if (++angle_index >= count)
{
angle_index = 0;
}
/*if (angle_count > 0) {
int ai = angle_index - 2;
if (ai < 0) ai = count - 1;
float dx = std::abs(angles[ai].x - angle.x);
float dy = std::abs(angles[ai].y - angle.y);
if (sqrt(dx * dx + dy * dy) > 45.0f) {
//logging::Info("%.2f %.2f %.2f", dx, dy, sqrt(dx * dx + dy *
dy));
}
}*/
if (angle_count < count)
{
angle_count++;
}
}
inline float deviation(int steps) const
{
int j = angle_index - 2;
int k = j + 1;
float hx = 0, hy = 0;
for (int i = 0; i < steps && i < angle_count; i++)
{
if (j < 0)
j = count + j;
if (k < 0)
k = count + k;
float dev_x = std::abs(angles[k].x - angles[j].x);
float dev_y = std::abs(angles[k].y - angles[j].y);
if (dev_x > hx)
hx = dev_x;
if (dev_y > hy)
hy = dev_y;
// logging::Info("1: %.2f %.2f | 2: %.2f %.2f | dev: %.2f",
// angles[k].x, angles[k].y, angles[j].x, angles[j].y, sqrt(dev_x *
// dev_x + dev_y * dev_y));
--j;
--k;
}
if (hy > 180)
hy = 360 - hy;
return sqrt(hx * hx + hy * hy);
}
void push(const Vector &angle);
float deviation(int steps) const;
Vector angles[count]{};
bool good{ false };
@ -80,18 +27,6 @@ struct angle_data_s
extern angle_data_s data_[32];
void Update();
inline angle_data_s &data_idx(int index)
{
if (index < 1 || index > 32)
{
throw std::out_of_range("Angle table entity index out of range");
}
return data_[index - 1];
}
inline angle_data_s &data(const CachedEntity *entity)
{
return data_idx(entity->m_IDX);
}
angle_data_s &data_idx(int index);
angle_data_s &data(const CachedEntity *entity);
} // namespace angles

View File

@ -11,52 +11,31 @@
#include "config.h"
#include <emmintrin.h>
#include <vector>
#include <bitset>
#include <string>
#include <array>
#include <cassert>
#include <functional>
#include <mutex>
#include <atomic>
#include <cmath>
#include <memory>
#include <iomanip>
#include <list>
#include <fstream>
#include <set>
#include <unordered_map>
#include <algorithm>
#include <csignal>
#include <sys/prctl.h>
#include <unistd.h>
#include <link.h>
#include <sys/sysinfo.h>
#include <dlfcn.h>
#include <elf.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <cstring>
#include <cstdio>
#include <cassert>
#include "timer.hpp"
#include "averager.hpp"
#include "core/macros.hpp"
#if ENABLE_VISUALS
#include <visual/colors.hpp>
#include <visual/drawing.hpp>
#include "visual/fidgetspinner.hpp"
#include <visual/EffectGlow.hpp>
#include <visual/atlas.hpp>
#include <visual/EffectChams.hpp>
#include <visual/drawmgr.hpp>
#endif
#include "core/profiler.hpp"
@ -66,8 +45,6 @@
#include <enums.hpp>
#include "projlogging.hpp"
#include "velocity.hpp"
#include "angles.hpp"
#include "entityhitboxcache.hpp"
#include "globals.h"
#include <helpers.hpp>
#include "playerlist.hpp"
@ -75,7 +52,6 @@
#include <localplayer.hpp>
#include <conditions.hpp>
#include <core/logging.hpp>
#include <targethelper.hpp>
#include "playerresource.h"
#include "sdk/usercmd.hpp"
#include "trace.hpp"
@ -84,7 +60,6 @@
#include "core/vfunc.hpp"
#include "hooks.hpp"
#include <prediction.hpp>
#include <conditions.hpp>
#include <itemtypes.hpp>
#include <chatstack.hpp>
#include "textfile.hpp"
@ -92,7 +67,6 @@
#include "tfmm.hpp"
#include "hooks/HookedMethods.hpp"
#include "classinfo/classinfo.hpp"
#include "votelogger.hpp"
#include "crits.hpp"
#include "textmode.hpp"
#include "core/sharedobj.hpp"

View File

@ -10,7 +10,6 @@
#include "entityhitboxcache.hpp"
#include "averager.hpp"
#include <mathlib/vector.h>
#include <mathlib/mathlib.h>
#include <icliententity.h>
#include <icliententitylist.h>
#include <cdll_int.h>
@ -22,7 +21,6 @@
#include "playerresource.h"
#include "globals.h"
#include "classinfo/classinfo.hpp"
#include "classinfo/tf2.gen.hpp"
#include "client_class.h"
struct matrix3x4_t;

View File

@ -7,13 +7,11 @@
#pragma once
#include <mathlib/vector.h>
#include <mathlib/mathlib.h>
#include <cdll_int.h>
#include <entitycache.hpp>
#include <studio.h>
#include <stdexcept>
// Forward declaration from entitycache.hpp
class CachedEntity;
#define CACHE_MAX_HITBOXES 64

View File

@ -2,7 +2,6 @@
#include "core/profiler.hpp"
#include "functional"
#include <set>
#include <array>
namespace EC

View File

@ -1,7 +1,10 @@
#pragma once
#include <memory>
#include <CNavFile.h>
#include "mathlib/vector.h"
class CNavFile;
class CNavArea;
namespace nav
{

View File

@ -1,15 +0,0 @@
/*
* fidgetspinner.hpp
*
* Created on: Jul 4, 2017
* Author: nullifiedcat
*/
#pragma once
#include <visual/atlas.hpp>
#include "common.hpp"
extern std::array<textures::sprite, 4> spinner_states;
void InitSpinner();
void DrawSpinner();

View File

@ -4,6 +4,7 @@
* Created on: Jun 5, 2017
* Author: nullifiedcat
*/
#include "common.hpp"
#include "angles.hpp"
namespace angles
@ -11,6 +12,77 @@ namespace angles
angle_data_s data_[32];
void angle_data_s::push(const Vector &angle)
{
if (not angle.x and not angle.y)
return;
good = true;
angles[angle_index] = angle;
if (++angle_index >= count)
{
angle_index = 0;
}
/*if (angle_count > 0) {
int ai = angle_index - 2;
if (ai < 0) ai = count - 1;
float dx = std::abs(angles[ai].x - angle.x);
float dy = std::abs(angles[ai].y - angle.y);
if (sqrt(dx * dx + dy * dy) > 45.0f) {
//logging::Info("%.2f %.2f %.2f", dx, dy, sqrt(dx * dx + dy *
dy));
}
}*/
if (angle_count < count)
{
angle_count++;
}
}
float angle_data_s::deviation(int steps) const
{
int j = angle_index - 2;
int k = j + 1;
float hx = 0, hy = 0;
for (int i = 0; i < steps && i < angle_count; i++)
{
if (j < 0)
j = count + j;
if (k < 0)
k = count + k;
float dev_x = std::abs(angles[k].x - angles[j].x);
float dev_y = std::abs(angles[k].y - angles[j].y);
if (dev_x > hx)
hx = dev_x;
if (dev_y > hy)
hy = dev_y;
// logging::Info("1: %.2f %.2f | 2: %.2f %.2f | dev: %.2f",
// angles[k].x, angles[k].y, angles[j].x, angles[j].y, sqrt(dev_x *
// dev_x + dev_y * dev_y));
--j;
--k;
}
if (hy > 180)
hy = 360 - hy;
return sqrt(hx * hx + hy * hy);
}
angle_data_s &data_idx(int index)
{
if (index < 1 || index > 32)
{
throw std::out_of_range("Angle table entity index out of range");
}
return data_[index - 1];
}
angle_data_s &data(const CachedEntity *entity)
{
return data_idx(entity->m_IDX);
}
void Update()
{
for (int i = 1; i < 33; i++)

View File

@ -6,6 +6,7 @@
*/
#include "common.hpp"
#include <bitset>
static CatCommand dump_conditions("debug_conditions", "Shows conditions for entity #", [](const CCommand &args) {
int id = atoi(args.Arg(1));

View File

@ -17,6 +17,8 @@
#include "hack.hpp"
#include "common.hpp"
#include "MiscTemporary.hpp"
#include <link.h>
#include <pwd.h>
#include <hacks/hacklist.hpp>
#if EXTERNAL_DRAWING
@ -354,26 +356,8 @@ free(logname);*/
playerlist::Load();
#if ENABLE_VISUALS
InitStrings();
#ifndef FEATURE_EFFECTS_DISABLED
if (g_ppScreenSpaceRegistrationHead && g_pScreenSpaceEffects)
{
effect_chams::g_pEffectChams = new CScreenSpaceEffectRegistration("_cathook_chams", &effect_chams::g_EffectChams);
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_chams");
effect_glow::g_pEffectGlow = new CScreenSpaceEffectRegistration("_cathook_glow", &effect_glow::g_EffectGlow);
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_glow");
}
logging::Info("SSE enabled..");
#endif
#endif /* TEXTMODE */
#if ENABLE_VISUALS
#ifndef FEATURE_FIDGET_SPINNER_ENABLED
InitSpinner();
logging::Info("Initialized Fidget Spinner");
#endif
#endif
logging::Info("Clearing initializer stack");
while (!init_stack().empty())
{

View File

@ -14,6 +14,13 @@
#include <settings/Bool.hpp>
#include "common.hpp"
#include "MiscTemporary.hpp"
#include <targethelper.hpp>
#if ENABLE_VISUALS
#ifndef FEATURE_EFFECTS_DISABLED
#include "EffectChams.hpp"
#endif
#endif
namespace hacks::shared::aimbot
{

View File

@ -12,6 +12,7 @@
#include "common.hpp"
#include "PlayerTools.hpp"
#include "hack.hpp"
#include "angles.hpp"
namespace hacks::shared::anticheat
{

View File

@ -9,10 +9,8 @@
#include <unistd.h>
#include <regex>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <link.h>
#include <hacks/AntiAim.hpp>
#include <settings/Bool.hpp>

View File

@ -9,6 +9,7 @@
#include <hacks/AntiCheat.hpp>
#include <settings/Float.hpp>
#include "common.hpp"
#include "angles.hpp"
namespace ac::aimbot
{

View File

@ -8,6 +8,7 @@
#include <hacks/AntiCheat.hpp>
#include <settings/Bool.hpp>
#include "common.hpp"
#include "angles.hpp"
namespace ac::antiaim
{

View File

@ -13,6 +13,8 @@
#include "CatBot.hpp"
#include "ChatCommands.hpp"
#include "MiscTemporary.hpp"
#include <iomanip>
#include "votelogger.hpp"
static settings::Boolean dispatch_log{ "debug.log-dispatch-user-msg", "false" };
static settings::Boolean chat_filter_enable{ "chat.censor.enable", "false" };

View File

@ -16,10 +16,6 @@ DEFINE_HOOKED_METHOD(LevelShutdown, void, void *this_)
playerlist::Save();
g_Settings.bInvalid = true;
chat_stack::Reset();
#if ENABLE_VISUALS
effect_glow::g_EffectGlow.Shutdown();
effect_chams::g_EffectChams.Shutdown();
#endif
EC::run(EC::LevelShutdown);
#if ENABLE_IPC
if (ipc::peer)

View File

@ -11,6 +11,7 @@
#include "common.hpp"
#include "hitrate.hpp"
#include "hack.hpp"
#include "drawmgr.hpp"
extern settings::Boolean die_if_vac;
static Timer checkmmban{};
namespace hooked_methods

View File

@ -7,6 +7,7 @@
#include <settings/Bool.hpp>
#include "HookedMethods.hpp"
#include "MiscTemporary.hpp"
#include "votelogger.hpp"
settings::Boolean die_if_vac{ "misc.die-if-vac", "false" };
static settings::Boolean autoabandon{ "misc.auto-abandon", "false" };

View File

@ -10,6 +10,7 @@
#include <SDL2/SDL_syswm.h>
#include <menu/menu/Menu.hpp>
#include "clip.h"
#include "drawmgr.hpp"
static bool swapwindow_init{ false };
static bool init_wminfo{ false };

View File

@ -8,6 +8,7 @@
#include <chrono>
#include "soundcache.hpp"
#include "MiscTemporary.hpp"
#include <CNavFile.h>
namespace nav
{
@ -21,7 +22,7 @@ static settings::Boolean look{ "misc.pathing.look-at-path", "false" };
static settings::Int stuck_time{ "misc.pathing.stuck-time", "4000" };
static settings::Int unreachable_time{ "misc.pathing.unreachable-time", "1000" };
static std::vector<CNavArea*> crumbs;
static std::vector<CNavArea *> crumbs;
static Vector startPoint, endPoint;
enum ignore_status : uint8_t
@ -56,7 +57,7 @@ Vector GetClosestCornerToArea(CNavArea *CornerOf, const Vector &target)
std::array<Vector, 4> corners{
CornerOf->m_nwCorner, // NW
CornerOf->m_seCorner, // SE
{ CornerOf->m_seCorner.x, CornerOf->m_nwCorner.y, CornerOf->m_nwCorner.z },// NE
{ CornerOf->m_seCorner.x, CornerOf->m_nwCorner.y, CornerOf->m_nwCorner.z }, // NE
{ CornerOf->m_nwCorner.x, CornerOf->m_seCorner.y, CornerOf->m_seCorner.z } // SW
};
@ -91,20 +92,19 @@ float getZBetweenAreas(CNavArea *start, CNavArea *end)
return z2 - z1;
}
static std::unordered_map<std::pair<CNavArea *, CNavArea *>, ignoredata, boost::hash<std::pair<CNavArea *, CNavArea *>>> ignores;
namespace ignoremanager
{
static bool vischeck(CNavArea *begin, CNavArea *end)
{
static bool vischeck(CNavArea *begin, CNavArea *end)
{
Vector first = begin->m_center;
Vector second = end->m_center;
first.z += 42;
second.z += 42;
return IsVectorVisible(first, second, true, LOCAL_E, MASK_PLAYERSOLID);
}
static ignore_status runIgnoreChecks(CNavArea *begin, CNavArea *end)
{
}
static ignore_status runIgnoreChecks(CNavArea *begin, CNavArea *end)
{
if (getZBetweenAreas(begin, end) > 42)
return const_ignored;
if (!vischecks)
@ -113,9 +113,9 @@ namespace ignoremanager
return vischeck_success;
else
return vischeck_failed;
}
static void updateDanger()
{
}
static void updateDanger()
{
for (size_t i = 0; i <= HIGHEST_ENTITY; i++)
{
CachedEntity *ent = ENTITY(i);
@ -177,10 +177,10 @@ namespace ignoremanager
}
}
}
}
}
static void checkPath()
{
static void checkPath()
{
bool perform_repath = false;
// Vischecks
for (size_t i = 0; i < crumbs.size() - 1; i++)
@ -205,10 +205,10 @@ namespace ignoremanager
}
if (perform_repath)
repath();
}
// 0 = Not ignored, 1 = low priority, 2 = ignored
static int isIgnored(CNavArea *begin, CNavArea *end)
{
}
// 0 = Not ignored, 1 = low priority, 2 = ignored
static int isIgnored(CNavArea *begin, CNavArea *end)
{
if (ignores[{ end, nullptr }].status == danger_found)
return 2;
ignore_status status = ignores[{ begin, end }].status;
@ -220,21 +220,21 @@ namespace ignoremanager
return 1;
else
return 2;
}
static bool addTime(ignoredata &connection, ignore_status status)
{
}
static bool addTime(ignoredata &connection, ignore_status status)
{
connection.status = status;
connection.ignoreTimeout.update();
return true;
}
static bool addTime(CNavArea *begin, CNavArea *end, ignore_status status)
{
}
static bool addTime(CNavArea *begin, CNavArea *end, ignore_status status)
{
logging::Info("Ignored Connection %i-%i", begin->m_id, end->m_id);
return addTime(ignores[{ begin, end }], status);
}
static bool addTime(CNavArea *begin, CNavArea *end, Timer &time)
{
}
static bool addTime(CNavArea *begin, CNavArea *end, Timer &time)
{
if (!begin || !end)
{
// We can't reach the destination vector. Destination vector might
@ -256,14 +256,14 @@ namespace ignoremanager
return addTime(connection, explicit_ignored);
}
return false;
}
static void reset()
{
}
static void reset()
{
ignores.clear();
ResetPather();
}
static void updateIgnores()
{
}
static void updateIgnores()
{
static Timer update{};
static Timer last_pather_reset{};
static bool reset_pather = false;
@ -313,21 +313,24 @@ namespace ignoremanager
reset_pather = false;
ResetPather();
}
}
static bool isSafe(CNavArea *area)
{
}
static bool isSafe(CNavArea *area)
{
return !(ignores[{ area, nullptr }].status == danger_found);
}
};
}
}; // namespace ignoremanager
struct Graph : public micropather::Graph
{
std::unique_ptr<micropather::MicroPather> pather;
Graph() {
Graph()
{
pather = std::make_unique<micropather::MicroPather>(this, 3000, 6, true);
}
~Graph() override {}
~Graph() override
{
}
void AdjacentCost(void *state, MP_VECTOR<micropather::StateCost> *adjacent) override
{
CNavArea *center = static_cast<CNavArea *>(state);
@ -338,7 +341,8 @@ struct Graph : public micropather::Graph
if (isIgnored == 2)
continue;
float distance = center->m_center.DistTo(i.area->m_center);
if (isIgnored == 1) {
if (isIgnored == 1)
{
if (*vischeckBlock)
continue;
distance += 50000;
@ -352,7 +356,9 @@ struct Graph : public micropather::Graph
CNavArea *end = reinterpret_cast<CNavArea *>(stateEnd);
return start->m_center.DistTo(end->m_center);
}
void PrintStateInfo(void *) override {}
void PrintStateInfo(void *) override
{
}
};
// Navfile containing areas
@ -435,8 +441,7 @@ CNavArea *findClosestNavSquare(const Vector &vec)
for (auto &i : navfile->m_areas)
{
// Make sure we're not stuck on the same area for too long
if (isLocal && std::count(findClosestNavSquare_localAreas.begin(),
findClosestNavSquare_localAreas.end(), &i) >= 3)
if (isLocal && std::count(findClosestNavSquare_localAreas.begin(), findClosestNavSquare_localAreas.end(), &i) >= 3)
{
continue;
}
@ -447,8 +452,7 @@ CNavArea *findClosestNavSquare(const Vector &vec)
bestSquare = &i;
}
// Check if we are within x and y bounds of an area
if (ovBestDist >= dist || !i.IsOverlapping(vec) ||
!IsVectorVisible(vec, i.m_center, true, LOCAL_E, MASK_PLAYERSOLID))
if (ovBestDist >= dist || !i.IsOverlapping(vec) || !IsVectorVisible(vec, i.m_center, true, LOCAL_E, MASK_PLAYERSOLID))
{
continue;
}
@ -464,7 +468,7 @@ CNavArea *findClosestNavSquare(const Vector &vec)
return ovBestSquare;
}
std::vector<CNavArea*> findPath(const Vector &start, const Vector &end)
std::vector<CNavArea *> findPath(const Vector &start, const Vector &end)
{
using namespace std::chrono;
@ -478,12 +482,10 @@ std::vector<CNavArea*> findPath(const Vector &start, const Vector &end)
logging::Info("Start: (%f,%f,%f)", local->m_center.x, local->m_center.y, local->m_center.z);
logging::Info("End: (%f,%f,%f)", dest->m_center.x, dest->m_center.y, dest->m_center.z);
float cost;
std::vector<CNavArea*> pathNodes;
std::vector<CNavArea *> pathNodes;
time_point begin_pathing = high_resolution_clock::now();
int result = Map.pather->Solve(reinterpret_cast<void *>(local),
reinterpret_cast<void*>(dest),
reinterpret_cast<std::vector<void*>*>(&pathNodes), &cost);
int result = Map.pather->Solve(reinterpret_cast<void *>(local), reinterpret_cast<void *>(dest), reinterpret_cast<std::vector<void *> *>(&pathNodes), &cost);
long long timetaken = duration_cast<nanoseconds>(high_resolution_clock::now() - begin_pathing).count();
logging::Info("Pathing: Pather result: %i. Time taken (NS): %lld", result, timetaken);
// If no result found, return empty Vector
@ -611,15 +613,13 @@ static void cm()
}
if (look && LookAtPathTimer.check(1000))
{
Vector next{crumb_vec->x, crumb_vec->y, g_pLocalPlayer->v_Eye.z};
Vector next{ crumb_vec->x, crumb_vec->y, g_pLocalPlayer->v_Eye.z };
next = GetAimAtAngles(g_pLocalPlayer->v_Eye, next);
DoSlowAim(next);
current_user_cmd->viewangles = next;
}
// Detect when jumping is necessary
if ((!(g_pLocalPlayer->holding_sniper_rifle && g_pLocalPlayer->bZoomed) &&
crumb_vec->z - g_pLocalPlayer->v_Origin.z > 18 && last_jump.test_and_set(200)) ||
(last_jump.test_and_set(200) && inactivity.check(*stuck_time / 2)))
if ((!(g_pLocalPlayer->holding_sniper_rifle && g_pLocalPlayer->bZoomed) && crumb_vec->z - g_pLocalPlayer->v_Origin.z > 18 && last_jump.test_and_set(200)) || (last_jump.test_and_set(200) && inactivity.check(*stuck_time / 2)))
{
current_user_cmd->buttons |= IN_JUMP;
}
@ -629,9 +629,7 @@ static void cm()
* ignore that connection
* Or if inactive for too long
*/
if (inactivity.check(*stuck_time) || (inactivity.check(*unreachable_time) &&
!IsVectorVisible(g_pLocalPlayer->v_Origin, *crumb_vec + Vector(.0f, .0f, 41.5f),
false, LOCAL_E, MASK_PLAYERSOLID)))
if (inactivity.check(*stuck_time) || (inactivity.check(*unreachable_time) && !IsVectorVisible(g_pLocalPlayer->v_Origin, *crumb_vec + Vector(.0f, .0f, 41.5f), false, LOCAL_E, MASK_PLAYERSOLID)))
{
/* crumb is invalid if endPoint is used */
if (crumb_vec != &endPoint)
@ -656,12 +654,14 @@ static void drawcrumbs()
for (size_t i = 0; i < crumbs.size(); i++)
{
Vector wts1, wts2, *o1, *o2;
if (crumbs.size() - 1 == i) {
if (crumbs.size() - 1 == i)
{
if (!endPoint.IsValid())
break;
o2 = &endPoint;
} else
}
else
o2 = &crumbs[i + 1]->m_center;
o1 = &crumbs[i]->m_center;

View File

@ -368,4 +368,14 @@ void EffectChams::Render(int x, int y, int w, int h)
}
EffectChams g_EffectChams;
CScreenSpaceEffectRegistration *g_pEffectChams = nullptr;
static InitRoutine init([]() {
EC::Register(
EC::LevelShutdown, []() { g_EffectChams.Shutdown(); }, "chams");
if (g_ppScreenSpaceRegistrationHead && g_pScreenSpaceEffects)
{
effect_chams::g_pEffectChams = new CScreenSpaceEffectRegistration("_cathook_chams", &effect_chams::g_EffectChams);
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_chams");
}
});
} // namespace effect_chams

View File

@ -509,4 +509,15 @@ void EffectGlow::Render(int x, int y, int w, int h)
EffectGlow g_EffectGlow;
CScreenSpaceEffectRegistration *g_pEffectGlow = nullptr;
static InitRoutine init([]() {
EC::Register(
EC::LevelShutdown, []() { g_EffectGlow.Shutdown(); }, "glow");
if (g_ppScreenSpaceRegistrationHead && g_pScreenSpaceEffects)
{
effect_glow::g_pEffectGlow = new CScreenSpaceEffectRegistration("_cathook_glow", &effect_glow::g_EffectGlow);
g_pScreenSpaceEffects->EnableScreenSpaceEffect("_cathook_glow");
}
} // namespace effect_glow
);
} // namespace effect_glow

View File

@ -22,6 +22,7 @@
#include "visual/drawing.hpp"
#include "hack.hpp"
#include "menu/menu/Menu.hpp"
#include "drawmgr.hpp"
static settings::Boolean info_text{ "hack-info.enable", "true" };
static settings::Boolean info_text_min{ "hack-info.minimal", "false" };
@ -108,9 +109,6 @@ void DrawCheatVisuals()
PROF_SECTION(DRAW_skinchanger);
hacks::tf2::skinchanger::DrawText();
}
#ifndef FEATURE_FIDGET_SPINNER_ENABLED
DrawSpinner();
#endif
Prediction_PaintTraverse();
}
{

View File

@ -5,7 +5,6 @@
* Author: nullifiedcat
*/
#include "visual/fidgetspinner.hpp"
#include "common.hpp"
#include "../../external/libglez/ftgl/freetype-gl.h"
@ -87,4 +86,9 @@ void DrawSpinner()
angle -= PI * 4;
}
static InitRoutine init([]() {
InitSpinner();
EC::Register(EC::Draw, DrawSpinner, "spinner");
});
#endif

View File

@ -9,6 +9,7 @@
#include <boost/algorithm/string.hpp>
#include <settings/Bool.hpp>
#include "CatBot.hpp"
#include "votelogger.hpp"
static settings::Boolean vote_kicky{ "votelogger.autovote.yes", "false" };
static settings::Boolean vote_kickn{ "votelogger.autovote.no", "false" };