Lightesp converted (test)
This commit is contained in:
parent
10b735c88c
commit
4ff18a0d5d
@ -97,7 +97,7 @@
|
||||
#include "init.hpp"
|
||||
#include "reclasses/reclasses.hpp"
|
||||
#include <CNavFile.h>
|
||||
#include <astar.h>
|
||||
#include "HookTools.hpp"
|
||||
|
||||
#include "copypasted/Netvar.h"
|
||||
#include "copypasted/CSignature.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace hacks::shared::lightesp
|
||||
{
|
||||
#if ENABLE_VISUALS
|
||||
void run();
|
||||
void draw();
|
||||
rgba_t LightESPColor(CachedEntity *ent);
|
||||
#endif
|
||||
|
@ -4,11 +4,12 @@
|
||||
#include <init.hpp>
|
||||
#include "core/logging.hpp"
|
||||
|
||||
namespace HookTools {
|
||||
void CreateMove();
|
||||
namespace HookTools
|
||||
{
|
||||
void CreateMove();
|
||||
}
|
||||
|
||||
struct CreateMove
|
||||
{
|
||||
CreateMove(int priority = 5, std::function<void()> func = [](){});
|
||||
CreateMove(int priority = 5, std::function<void()> func = []() {});
|
||||
};
|
||||
|
@ -14,9 +14,9 @@ Vector minp[32];
|
||||
Vector maxp[32];
|
||||
bool drawEsp[32];
|
||||
|
||||
void run()
|
||||
{
|
||||
#if ENABLE_VISUALS
|
||||
static CreateMove run(5, []() {
|
||||
PROF_SECTION(CM_lightesp);
|
||||
if (!enable)
|
||||
return;
|
||||
for (int i = 1; i < g_IEngine->GetMaxClients(); i++)
|
||||
@ -42,8 +42,9 @@ void run()
|
||||
maxp[i] = pEntity->hitboxes.GetHitbox(0)->max;
|
||||
drawEsp[i] = true;
|
||||
}
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
void draw()
|
||||
{
|
||||
#if ENABLE_VISUALS
|
||||
|
@ -286,10 +286,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
PROF_SECTION(CM_esp);
|
||||
hacks::shared::esp::CreateMove();
|
||||
}
|
||||
{
|
||||
PROF_SECTION(CM_lightesp);
|
||||
hacks::shared::lightesp::run();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon()))
|
||||
|
@ -23,13 +23,11 @@ void HookTools::CreateMove()
|
||||
}
|
||||
|
||||
static InitRoutine init([]() {
|
||||
auto &CreateMoves = GetCreateMoves();
|
||||
std::sort(CreateMoves.begin(),
|
||||
CreateMoves.end(),
|
||||
[](std::pair<int, std::function<void()>> a,
|
||||
std::pair<int, std::function<void()>> b) {
|
||||
return a.first > b.first;
|
||||
});
|
||||
logging::Info("Sorted CreateMove functions: %i",
|
||||
CreateMoves.size());
|
||||
auto &CreateMoves = GetCreateMoves();
|
||||
std::sort(CreateMoves.begin(), CreateMoves.end(),
|
||||
[](std::pair<int, std::function<void()>> a,
|
||||
std::pair<int, std::function<void()>> b) {
|
||||
return a.first > b.first;
|
||||
});
|
||||
logging::Info("Sorted CreateMove functions: %i", CreateMoves.size());
|
||||
});
|
||||
|
Reference in New Issue
Block a user