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