Update LagExploit.cpp

This commit is contained in:
BenCat07 2018-02-07 12:07:51 +01:00 committed by GitHub
parent 8149cf7de5
commit 91aa68f1bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ CatVar value(CV_INT, "se_value", "900", "Sequence exploit value",
CatCommand do_lagexploit("se_do", "Sequence exploit (for use in scripts)", CatCommand do_lagexploit("se_do", "Sequence exploit (for use in scripts)",
[]() { AddExploitTicks(6); }); []() { AddExploitTicks(6); });
AimbotCalculatedData_s calculated_data_array[2048]{};
int exticks = 0; int exticks = 0;
void AddExploitTicks(int ticks) void AddExploitTicks(int ticks)
{ {
@ -59,6 +59,18 @@ static CatVar infinite_packs(CV_SWITCH, "infinite_packs", "0",
"Activate sequence exploit when standing on " "Activate sequence exploit when standing on "
"pickups while having not full HP/Ammo"); "pickups while having not full HP/Ammo");
bool VischeckPredictedEntity(CachedEntity *entity)
{
// Retrieve predicted data
AimbotCalculatedData_s &cd = calculated_data_array[entity->m_IDX];
if (cd.vcheck_tick == tickcount)
return cd.visible;
// Update info
cd.vcheck_tick = tickcount;
cd.visible = IsEntityVectorVisible(entity, entity->m_vecOrigin);
return cd.visible;
}
void CreateMove() void CreateMove()
{ {
if (CE_BAD(LOCAL_E)) if (CE_BAD(LOCAL_E))
@ -137,12 +149,28 @@ void CreateMove()
return; return;
int amount = 0; int amount = 0;
static bool bWasHolding = false; static bool bWasHolding = false;
static model_t *point = nullptr;
bool bIsHolding = ((g_pUserCmd->buttons & IN_ATTACK) || bool bIsHolding = ((g_pUserCmd->buttons & IN_ATTACK) ||
(g_pUserCmd->buttons & IN_ATTACK2)); (g_pUserCmd->buttons & IN_ATTACK2));
if (cap) if (cap)
{ {
for (int i = 1; i < HIGHEST_ENTITY; i++) for (int i = 1; i < HIGHEST_ENTITY; i++)
{ {
if (!point)
{
CachedEntity *pEnt = ENTITY(i);
const model_t *model = RAW_ENT(pEnt)->GetModel();
if (!model)
continue;
const char *model_name = g_IModelInfo->GetModelName(model);
if (strstr("models/props_gameplay/cap_point_base.mdl",
model_name))
point = model;
else
continue;
}
CachedEntity *pEnt = ENTITY(i); CachedEntity *pEnt = ENTITY(i);
if (!CE_GOOD(pEnt)) if (!CE_GOOD(pEnt))
continue; continue;
@ -151,8 +179,7 @@ void CreateMove()
const model_t *model = RAW_ENT(pEnt)->GetModel(); const model_t *model = RAW_ENT(pEnt)->GetModel();
if (!model) if (!model)
continue; continue;
const char *model_name = g_IModelInfo->GetModelName(model); if (model == point)
if (strstr("models/props_gameplay/cap_point_base.mdl", model_name))
{ {
if (!CE_GOOD(LOCAL_E)) if (!CE_GOOD(LOCAL_E))
continue; continue;