push with merge conflicts for Elite to fix
This commit is contained in:
parent
30abfddc81
commit
d57a8c6a39
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
// This is a temporary file to put code that needs moving/refactoring in.
|
// This is a temporary file to put code that needs moving/refactoring in.
|
||||||
extern bool *bSendPackets;
|
extern bool *bSendPackets;
|
||||||
|
extern std::array<int, 32> bruteint;
|
||||||
|
extern std::array<Timer, 32> timers;
|
||||||
extern CatVar no_zoom;
|
extern CatVar no_zoom;
|
||||||
extern CatVar clean_screenshots;
|
extern CatVar clean_screenshots;
|
||||||
extern CatVar disable_visuals;
|
extern CatVar disable_visuals;
|
||||||
@ -23,6 +25,7 @@ extern CatVar serverlag_amount;
|
|||||||
extern CatVar servercrash;
|
extern CatVar servercrash;
|
||||||
extern CatVar debug_projectiles;
|
extern CatVar debug_projectiles;
|
||||||
extern CatVar semiauto;
|
extern CatVar semiauto;
|
||||||
|
extern CatVar resolver;
|
||||||
extern CatVar engine_pred;
|
extern CatVar engine_pred;
|
||||||
extern Timer DelayTimer;
|
extern Timer DelayTimer;
|
||||||
extern bool firstcm;
|
extern bool firstcm;
|
||||||
|
2
include/helpers.hpp
Executable file → Normal file
2
include/helpers.hpp
Executable file → Normal file
@ -81,7 +81,7 @@ Vector VischeckWall(CachedEntity *player, CachedEntity *target, float maxdist,
|
|||||||
bool checkWalkable);
|
bool checkWalkable);
|
||||||
float vectorMax(Vector i);
|
float vectorMax(Vector i);
|
||||||
Vector vectorAbs(Vector i);
|
Vector vectorAbs(Vector i);
|
||||||
bool canReachVector(Vector loc, Vector dest = {0,0,0});
|
bool canReachVector(Vector loc, Vector dest = { 0, 0, 0 });
|
||||||
bool isJumping(Vector vec);
|
bool isJumping(Vector vec);
|
||||||
|
|
||||||
bool LineIntersectsBox(Vector &bmin, Vector &bmax, Vector &lmin, Vector &lmax);
|
bool LineIntersectsBox(Vector &bmin, Vector &bmax, Vector &lmin, Vector &lmax);
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MiscTemporary.hpp"
|
#include "MiscTemporary.hpp"
|
||||||
|
std::array<Timer, 32> timers{};
|
||||||
|
std::array<int, 32> bruteint{};
|
||||||
CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
||||||
"Allows jumping while shooting with minigun");
|
"Allows jumping while shooting with minigun");
|
||||||
|
|
||||||
@ -25,7 +27,8 @@ CatVar serverlag_amount(
|
|||||||
CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers",
|
CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers",
|
||||||
"Crash servers by spamming signon net messages");
|
"Crash servers by spamming signon net messages");
|
||||||
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");
|
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");
|
||||||
bool *bSendPackets;
|
bool *bSendPackets = nullptr;
|
||||||
|
CatVar resolver(CV_SWITCH, "resolver", "0", "Resolve angles");
|
||||||
|
|
||||||
CatVar crypt_chat(
|
CatVar crypt_chat(
|
||||||
CV_SWITCH, "chat_crypto", "1", "Crypto chat",
|
CV_SWITCH, "chat_crypto", "1", "Crypto chat",
|
||||||
|
@ -3,12 +3,6 @@
|
|||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
|
||||||
#define INRANGE(x, a, b) (x >= a && x <= b)
|
|
||||||
#define getBits(x) \
|
|
||||||
(INRANGE((x & (~0x20)), 'A', 'F') ? ((x & (~0x20)) - 'A' + 0xa) \
|
|
||||||
: (INRANGE(x, '0', '9') ? x - '0' : 0))
|
|
||||||
#define getByte(x) (getBits(x[0]) << 4 | getBits(x[1]))
|
|
||||||
|
|
||||||
// module should be a pointer to the base of an elf32 module
|
// module should be a pointer to the base of an elf32 module
|
||||||
// this is not the value returned by dlopen (which returns an opaque handle to
|
// this is not the value returned by dlopen (which returns an opaque handle to
|
||||||
// the module) the best method to get this address is with fopen() and mmap()
|
// the module) the best method to get this address is with fopen() and mmap()
|
||||||
@ -51,9 +45,73 @@ Elf32_Shdr *getSectionHeader(void *module, const char *sectionName)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
bool InRange(char x, char a, char b)
|
||||||
|
{
|
||||||
|
return x >= a && x <= b;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetBits(char x)
|
||||||
|
{
|
||||||
|
if (InRange((char) (x & (~0x20)), 'A', 'F'))
|
||||||
|
{
|
||||||
|
return (x & (~0x20)) - 'A' + 0xa;
|
||||||
|
}
|
||||||
|
else if (InRange(x, '0', '9'))
|
||||||
|
{
|
||||||
|
return x - '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int GetBytes(const char *x)
|
||||||
|
{
|
||||||
|
return GetBits(x[0]) << 4 | GetBits(x[1]);
|
||||||
|
}
|
||||||
uintptr_t CSignature::dwFindPattern(uintptr_t dwAddress, uintptr_t dwLength,
|
uintptr_t CSignature::dwFindPattern(uintptr_t dwAddress, uintptr_t dwLength,
|
||||||
const char *szPattern)
|
const char *szPattern)
|
||||||
|
{
|
||||||
|
const char *pattern = szPattern;
|
||||||
|
uintptr_t firstMatch = 0;
|
||||||
|
|
||||||
|
uintptr_t start = dwAddress;
|
||||||
|
uintptr_t end = dwLength;
|
||||||
|
|
||||||
|
for (uintptr_t pos = start; pos < end; pos++)
|
||||||
|
{
|
||||||
|
if (*pattern == 0)
|
||||||
|
return firstMatch;
|
||||||
|
|
||||||
|
const uint8_t currentPattern =
|
||||||
|
*reinterpret_cast<const uint8_t *>(pattern);
|
||||||
|
const uint8_t currentMemory = *reinterpret_cast<const uint8_t *>(pos);
|
||||||
|
|
||||||
|
if (currentPattern == '\?' || currentMemory == GetBytes(pattern))
|
||||||
|
{
|
||||||
|
if (firstMatch == 0)
|
||||||
|
firstMatch = pos;
|
||||||
|
|
||||||
|
if (pattern[2] == 0)
|
||||||
|
{
|
||||||
|
logging::Info("Found pattern \"%s\" at 0x%08X.", szPattern,
|
||||||
|
firstMatch);
|
||||||
|
return firstMatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
pattern += currentPattern != '\?' ? 3 : 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pattern = szPattern;
|
||||||
|
firstMatch = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logging::Info("THIS IS SERIOUS: Could not locate signature: "
|
||||||
|
"\n============\n\"%s\"\n============",
|
||||||
|
szPattern);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/*uintptr_t CSignature::dwFindPattern(uintptr_t dwAddress, uintptr_t dwLength,
|
||||||
|
const char *szPattern)
|
||||||
{
|
{
|
||||||
const char *pat = szPattern;
|
const char *pat = szPattern;
|
||||||
uintptr_t firstMatch = NULL;
|
uintptr_t firstMatch = NULL;
|
||||||
@ -84,7 +142,7 @@ uintptr_t CSignature::dwFindPattern(uintptr_t dwAddress, uintptr_t dwLength,
|
|||||||
szPattern);
|
szPattern);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}*/
|
||||||
//===================================================================================
|
//===================================================================================
|
||||||
void *CSignature::GetModuleHandleSafe(const char *pszModuleName)
|
void *CSignature::GetModuleHandleSafe(const char *pszModuleName)
|
||||||
{
|
{
|
||||||
|
@ -182,8 +182,8 @@ bool BacktrackAimbot()
|
|||||||
{
|
{
|
||||||
if (!hacks::shared::backtrack::enable || !backtrackAimbot)
|
if (!hacks::shared::backtrack::enable || !backtrackAimbot)
|
||||||
return false;
|
return false;
|
||||||
if (aimkey && !aimkey.KeyDown())
|
if (aimkey && !aimkey.KeyDown())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer() || !CanShoot())
|
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer() || !CanShoot())
|
||||||
return false;
|
return false;
|
||||||
@ -194,14 +194,15 @@ bool BacktrackAimbot()
|
|||||||
|
|
||||||
int iBestTarget = hacks::shared::backtrack::iBestTarget;
|
int iBestTarget = hacks::shared::backtrack::iBestTarget;
|
||||||
if (iBestTarget == -1)
|
if (iBestTarget == -1)
|
||||||
return true;
|
return true;
|
||||||
int tickcnt = 0;
|
int tickcnt = 0;
|
||||||
|
|
||||||
for (auto i : hacks::shared::backtrack::headPositions[iBestTarget])
|
for (auto i : hacks::shared::backtrack::headPositions[iBestTarget])
|
||||||
{
|
{
|
||||||
bool good_tick = false;
|
bool good_tick = false;
|
||||||
for (int j = 0; j < 12; ++j)
|
for (int j = 0; j < 12; ++j)
|
||||||
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick && hacks::shared::backtrack::sorted_ticks[j].tickcount != FLT_MAX)
|
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick &&
|
||||||
|
hacks::shared::backtrack::sorted_ticks[j].tickcount != FLT_MAX)
|
||||||
good_tick = true;
|
good_tick = true;
|
||||||
tickcnt++;
|
tickcnt++;
|
||||||
if (!i.hitboxpos.z)
|
if (!i.hitboxpos.z)
|
||||||
@ -216,6 +217,7 @@ bool BacktrackAimbot()
|
|||||||
// ok just in case
|
// ok just in case
|
||||||
if (CE_BAD(tar))
|
if (CE_BAD(tar))
|
||||||
continue;
|
continue;
|
||||||
|
//target_eid = tar->m_IDX;
|
||||||
Vector &angles = NET_VECTOR(tar, netvar.m_angEyeAngles);
|
Vector &angles = NET_VECTOR(tar, netvar.m_angEyeAngles);
|
||||||
float &simtime = NET_FLOAT(tar, netvar.m_flSimulationTime);
|
float &simtime = NET_FLOAT(tar, netvar.m_flSimulationTime);
|
||||||
angles.y = i.viewangles;
|
angles.y = i.viewangles;
|
||||||
@ -232,11 +234,11 @@ bool BacktrackAimbot()
|
|||||||
else if (silent)
|
else if (silent)
|
||||||
g_pLocalPlayer->bUseSilentAngles = true;
|
g_pLocalPlayer->bUseSilentAngles = true;
|
||||||
if (!slow_aim)
|
if (!slow_aim)
|
||||||
slow_can_shoot = true;
|
slow_can_shoot = true;
|
||||||
// Set angles
|
// Set angles
|
||||||
g_pUserCmd->viewangles = angles2;
|
g_pUserCmd->viewangles = angles2;
|
||||||
if (autoshoot && slow_can_shoot)
|
if (autoshoot && slow_can_shoot)
|
||||||
g_pUserCmd->buttons |= IN_ATTACK;
|
g_pUserCmd->buttons |= IN_ATTACK;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -289,8 +291,6 @@ void CreateMove()
|
|||||||
g_pLocalPlayer->weapon_mode == weapon_throwable))
|
g_pLocalPlayer->weapon_mode == weapon_throwable))
|
||||||
projectileAimbotRequired = true;
|
projectileAimbotRequired = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Local player check + Aimkey
|
// Local player check + Aimkey
|
||||||
if (!aimkey_status || !ShouldAim())
|
if (!aimkey_status || !ShouldAim())
|
||||||
return;
|
return;
|
||||||
@ -308,7 +308,7 @@ void CreateMove()
|
|||||||
cur_proj_grav = float(proj_gravity);
|
cur_proj_grav = float(proj_gravity);
|
||||||
}
|
}
|
||||||
if (BacktrackAimbot())
|
if (BacktrackAimbot())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!g_IEntityList->GetClientEntity(target_entity->m_IDX))
|
if (!g_IEntityList->GetClientEntity(target_entity->m_IDX))
|
||||||
return;
|
return;
|
||||||
@ -325,6 +325,7 @@ void CreateMove()
|
|||||||
// Attemt to auto-shoot
|
// Attemt to auto-shoot
|
||||||
|
|
||||||
// flNextPrimaryAttack meme
|
// flNextPrimaryAttack meme
|
||||||
|
//target_eid = target_entity->m_IDX;
|
||||||
if (only_can_shoot)
|
if (only_can_shoot)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -6,27 +6,31 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <hacks/hacklist.hpp>
|
#include <hacks/hacklist.hpp>
|
||||||
|
#include <glez/draw.hpp>
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
|
||||||
namespace hacks::shared::antiaim
|
namespace hacks::shared::antiaim
|
||||||
{
|
{
|
||||||
|
|
||||||
CatVar communicate(CV_SWITCH, "identify", "0", "identify",
|
CatVar communicate(CV_SWITCH, "identify", "0", "identify",
|
||||||
"Auto identify for other cathook users");
|
"Auto identify for other cathook users");
|
||||||
CatVar enabled(CV_SWITCH, "aa_enabled", "0", "Anti-Aim",
|
CatVar enabled(CV_SWITCH, "aa_enabled", "0", "Anti-Aim",
|
||||||
"Master AntiAim switch");
|
"Master AntiAim switch");
|
||||||
static CatVar crouch(CV_SWITCH, "aa_fakecrouch", "0", "Fake Crouch", "Fake crouch");
|
CatVar draw_fakes(CV_SWITCH, "aa_drawfakes", "1", "Draw Fakes",
|
||||||
|
"Draw a nice box around the head hitboxes");
|
||||||
|
static CatVar crouch(CV_SWITCH, "aa_fakecrouch", "0", "Fake Crouch",
|
||||||
|
"Fake crouch");
|
||||||
static CatVar yaw(CV_FLOAT, "aa_yaw", "0.0", "Yaw", "Static yaw (left/right)",
|
static CatVar yaw(CV_FLOAT, "aa_yaw", "0.0", "Yaw", "Static yaw (left/right)",
|
||||||
360.0);
|
360.0);
|
||||||
static CatVar pitch(CV_FLOAT, "aa_pitch", "-89.0", "Pitch",
|
static CatVar pitch(CV_FLOAT, "aa_pitch", "-89.0", "Pitch",
|
||||||
"Static pitch (up/down)", -89.0, 89.0);
|
"Static pitch (up/down)", -89.0, 89.0);
|
||||||
static CatEnum yaw_mode_enum({ "KEEP", "STATIC", "JITTER",
|
static CatEnum yaw_mode_enum({ "KEEP", "STATIC", "JITTER",
|
||||||
"BIGRANDOM", "RANDOM", "SPIN",
|
"BIGRANDOM", "RANDOM", "SPIN",
|
||||||
"OFFSETKEEP", "EDGE", "HECK",
|
"OFFSETKEEP", "EDGE", "HECK",
|
||||||
"FAKEKEEP", "FAKESTATIC", "FAKEJITTER",
|
"FAKEKEEP", "FAKESTATIC", "FAKEJITTER",
|
||||||
"FAKEBIGRANDOM", "FAKERANDOM", "FAKESPIN",
|
"FAKEBIGRANDOM", "FAKERANDOM", "FAKESPIN",
|
||||||
"FAKEOFFSETKEEP", "FAKEEDGE", "FAKEHECK", "FAKESIDEWAYS", "FAKELEFT",
|
"FAKEOFFSETKEEP", "FAKEEDGE", "FAKEHECK",
|
||||||
"FAKERIGHT", "FAKEREVERSEEDGE"});
|
"FAKESIDEWAYS", "FAKELEFT", "FAKERIGHT",
|
||||||
|
"FAKEREVERSEEDGE" });
|
||||||
static CatEnum pitch_mode_enum({ "KEEP", "STATIC", "JITTER", "RANDOM", "FLIP",
|
static CatEnum pitch_mode_enum({ "KEEP", "STATIC", "JITTER", "RANDOM", "FLIP",
|
||||||
"FAKEFLIP", "FAKEUP", "FAKEDOWN", "FAKECENTER",
|
"FAKEFLIP", "FAKEUP", "FAKEDOWN", "FAKECENTER",
|
||||||
"UP", "DOWN", "HECK" });
|
"UP", "DOWN", "HECK" });
|
||||||
@ -74,7 +78,7 @@ float GetAAAAPitch()
|
|||||||
case 1:
|
case 1:
|
||||||
return aaaa_stage ? 271 : 89;
|
return aaaa_stage ? 271 : 89;
|
||||||
case 2:
|
case 2:
|
||||||
return aaaa_stage ? -180 : 180;
|
return aaaa_stage ? -180 : 180;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -388,59 +392,54 @@ float useEdge(float edgeViewAngle)
|
|||||||
Timer delay{};
|
Timer delay{};
|
||||||
int val = 0;
|
int val = 0;
|
||||||
int value[32] = { 0 };
|
int value[32] = { 0 };
|
||||||
void FakeCrouch(CUserCmd * cmd)
|
void FakeCrouch(CUserCmd *cmd)
|
||||||
{
|
{
|
||||||
if (!crouch)
|
if (!crouch)
|
||||||
return;
|
return;
|
||||||
if (cmd->buttons & IN_ATTACK)
|
if (cmd->buttons & IN_ATTACK)
|
||||||
{
|
{
|
||||||
*bSendPackets = true;
|
*bSendPackets = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
static bool bDuck = false;
|
static bool bDuck = false;
|
||||||
|
|
||||||
static int waittime = 0;
|
static int waittime = 0;
|
||||||
|
|
||||||
if (waittime)
|
if (waittime)
|
||||||
{
|
{
|
||||||
waittime--;
|
waittime--;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bDuck = !bDuck;
|
bDuck = !bDuck;
|
||||||
|
|
||||||
if (bDuck)
|
if (bDuck)
|
||||||
{
|
{
|
||||||
cmd->buttons |= IN_DUCK;
|
cmd->buttons |= IN_DUCK;
|
||||||
*bSendPackets = false;
|
*bSendPackets = false;
|
||||||
waittime = 15;
|
waittime = 15;
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
cmd->buttons &= ~IN_DUCK;
|
{
|
||||||
*bSendPackets = true;
|
cmd->buttons &= ~IN_DUCK;
|
||||||
}
|
*bSendPackets = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void ProcessUserCmd(CUserCmd *cmd)
|
void ProcessUserCmd(CUserCmd *cmd)
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
|
{
|
||||||
|
*bSendPackets = true;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (!ShouldAA(cmd))
|
if (!ShouldAA(cmd))
|
||||||
return;
|
return;
|
||||||
static bool angstate = true;
|
static bool keepmode = true;
|
||||||
static bool keepmode = true;
|
keepmode = !keepmode;
|
||||||
keepmode = !keepmode;
|
float &p = cmd->viewangles.x;
|
||||||
if ((int) yaw_mode >= 8)
|
float &y = cmd->viewangles.y;
|
||||||
angstate = !angstate;
|
static bool flip = false;
|
||||||
else
|
static bool bsendflip = true;
|
||||||
angstate = true;
|
bool clamp = !no_clamping;
|
||||||
if (!LOCAL_E->m_bAlivePlayer())
|
|
||||||
angstate = true;
|
|
||||||
if (g_pUserCmd->buttons & IN_ATTACK || g_pUserCmd->buttons & IN_ATTACK2)
|
|
||||||
angstate = true;
|
|
||||||
*bSendPackets = angstate;
|
|
||||||
float &p = cmd->viewangles.x;
|
|
||||||
float &y = cmd->viewangles.y;
|
|
||||||
static bool flip = false;
|
|
||||||
bool clamp = !no_clamping;
|
|
||||||
if (test)
|
if (test)
|
||||||
{
|
{
|
||||||
cmd->viewangles.x = FLT_MAX;
|
cmd->viewangles.x = FLT_MAX;
|
||||||
@ -503,7 +502,6 @@ void ProcessUserCmd(CUserCmd *cmd)
|
|||||||
else
|
else
|
||||||
y -= 90;
|
y -= 90;
|
||||||
break;
|
break;
|
||||||
flip = !flip;
|
|
||||||
}
|
}
|
||||||
clamp = false;
|
clamp = false;
|
||||||
break;
|
break;
|
||||||
@ -547,20 +545,20 @@ void ProcessUserCmd(CUserCmd *cmd)
|
|||||||
y += (float) yaw;
|
y += (float) yaw;
|
||||||
break;
|
break;
|
||||||
case 16: // Fake edge
|
case 16: // Fake edge
|
||||||
if (*bSendPackets)
|
if (*bSendPackets)
|
||||||
{
|
{
|
||||||
// Attemt to find an edge and if found, edge
|
// Attemt to find an edge and if found, edge
|
||||||
if (findEdge(y))
|
if (findEdge(y))
|
||||||
y = useEdge(y);
|
y = useEdge(y);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 17: // Fake heck
|
case 17: // Fake heck
|
||||||
if (*bSendPackets)
|
if (*bSendPackets)
|
||||||
{
|
{
|
||||||
FuckYaw(y);
|
FuckYaw(y);
|
||||||
clamp = false;
|
clamp = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 18: // Fake sideways
|
case 18: // Fake sideways
|
||||||
y += *bSendPackets ? 90.0f : -90.0f;
|
y += *bSendPackets ? 90.0f : -90.0f;
|
||||||
break;
|
break;
|
||||||
@ -571,13 +569,13 @@ void ProcessUserCmd(CUserCmd *cmd)
|
|||||||
y += !*bSendPackets ? 0.0f : 90.0f;
|
y += !*bSendPackets ? 0.0f : 90.0f;
|
||||||
break;
|
break;
|
||||||
case 21: // Fake reverse edge
|
case 21: // Fake reverse edge
|
||||||
if (*bSendPackets)
|
if (*bSendPackets)
|
||||||
{
|
{
|
||||||
// Attemt to find an edge and if found, edge
|
// Attemt to find an edge and if found, edge
|
||||||
if (findEdge(y))
|
if (findEdge(y))
|
||||||
y = useEdge(y) + 180.0f;
|
y = useEdge(y) + 180.0f;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -625,7 +623,7 @@ void ProcessUserCmd(CUserCmd *cmd)
|
|||||||
clamp = false;
|
clamp = false;
|
||||||
}
|
}
|
||||||
if (*bSendPackets)
|
if (*bSendPackets)
|
||||||
flip = !flip;
|
flip = !flip;
|
||||||
if (clamp)
|
if (clamp)
|
||||||
fClampAngle(cmd->viewangles);
|
fClampAngle(cmd->viewangles);
|
||||||
if (roll)
|
if (roll)
|
||||||
|
@ -71,7 +71,7 @@ void CreateMove()
|
|||||||
Vector &angles = NET_VECTOR(tar, netvar.m_angEyeAngles);
|
Vector &angles = NET_VECTOR(tar, netvar.m_angEyeAngles);
|
||||||
float &simtime = NET_FLOAT(tar, netvar.m_flSimulationTime);
|
float &simtime = NET_FLOAT(tar, netvar.m_flSimulationTime);
|
||||||
angles.y = i.viewangles;
|
angles.y = i.viewangles;
|
||||||
simtime = i.simtime;
|
simtime = i.simtime;
|
||||||
g_pUserCmd->tick_count = i.tickcount;
|
g_pUserCmd->tick_count = i.tickcount;
|
||||||
g_pUserCmd->buttons |= IN_ATTACK;
|
g_pUserCmd->buttons |= IN_ATTACK;
|
||||||
break;
|
break;
|
||||||
|
@ -578,7 +578,7 @@ int HealingPriority(int idx)
|
|||||||
int overheal = maxoverheal - (maxbuffedhealth - health);
|
int overheal = maxoverheal - (maxbuffedhealth - health);
|
||||||
float overhealp = ((float) overheal / (float) maxoverheal);
|
float overhealp = ((float) overheal / (float) maxoverheal);
|
||||||
float healthp = ((float) health / (float) maxhealth);
|
float healthp = ((float) health / (float) maxhealth);
|
||||||
priority += hacks::shared::followbot::ClassPriority(ent) * 10;
|
priority += hacks::shared::followbot::ClassPriority(ent) * 1.3;
|
||||||
switch (playerlist::AccessData(ent).state)
|
switch (playerlist::AccessData(ent).state)
|
||||||
{
|
{
|
||||||
case playerlist::k_EState::FRIEND:
|
case playerlist::k_EState::FRIEND:
|
||||||
|
@ -102,10 +102,10 @@ void Run()
|
|||||||
}
|
}
|
||||||
shouldDrawBt = true;
|
shouldDrawBt = true;
|
||||||
|
|
||||||
CUserCmd *cmd = g_pUserCmd;
|
CUserCmd *cmd = g_pUserCmd;
|
||||||
float bestFov = 99999;
|
float bestFov = 99999;
|
||||||
BestTick = 0;
|
BestTick = 0;
|
||||||
iBestTarget = -1;
|
iBestTarget = -1;
|
||||||
|
|
||||||
float prev_distance = 9999;
|
float prev_distance = 9999;
|
||||||
|
|
||||||
@ -161,20 +161,26 @@ void Run()
|
|||||||
float bestFOV = 180.0f;
|
float bestFOV = 180.0f;
|
||||||
float distance, prev_distance_ticks = 9999;
|
float distance, prev_distance_ticks = 9999;
|
||||||
|
|
||||||
|
<<<<<<< Updated upstream
|
||||||
for (int i = 0; i < 12; ++i)
|
for (int i = 0; i < 12; ++i)
|
||||||
sorted_ticks[i] = BestTickData{INT_MAX, i};
|
sorted_ticks[i] = BestTickData{INT_MAX, i};
|
||||||
|
=======
|
||||||
|
for (int i = 0; i < 12; ++i)
|
||||||
|
sorted_ticks[i] = BestTickData{ FLT_MAX, i };
|
||||||
|
>>>>>>> Stashed changes
|
||||||
for (int t = 0; t < ticks; ++t)
|
for (int t = 0; t < ticks; ++t)
|
||||||
{
|
{
|
||||||
if (headPositions[iBestTarget][t].tickcount)
|
if (headPositions[iBestTarget][t].tickcount)
|
||||||
sorted_ticks[t] =
|
sorted_ticks[t] =
|
||||||
BestTickData{ headPositions[iBestTarget][t].tickcount, t };
|
BestTickData{ headPositions[iBestTarget][t].tickcount, t };
|
||||||
}
|
}
|
||||||
std::sort(sorted_ticks, sorted_ticks + ticks);
|
std::sort(sorted_ticks, sorted_ticks + ticks);
|
||||||
for (int t = 0; t < ticks; ++t)
|
for (int t = 0; t < ticks; ++t)
|
||||||
{
|
{
|
||||||
bool good_tick = false;
|
bool good_tick = false;
|
||||||
for (int i = 0; i < 12; ++i)
|
for (int i = 0; i < 12; ++i)
|
||||||
if (t == sorted_ticks[i].tick && sorted_ticks[i].tickcount != FLT_MAX)
|
if (t == sorted_ticks[i].tick &&
|
||||||
|
sorted_ticks[i].tickcount != FLT_MAX)
|
||||||
good_tick = true;
|
good_tick = true;
|
||||||
if (!good_tick)
|
if (!good_tick)
|
||||||
continue;
|
continue;
|
||||||
|
@ -308,7 +308,6 @@ struct bonelist_s
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::unordered_map<studiohdr_t *, bonelist_s> bonelist_map{};
|
std::unordered_map<studiohdr_t *, bonelist_s> bonelist_map{};
|
||||||
|
|
||||||
// Function called on draw
|
// Function called on draw
|
||||||
void Draw()
|
void Draw()
|
||||||
{
|
{
|
||||||
@ -505,17 +504,6 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent)
|
|||||||
// Get if ent should be transparent
|
// Get if ent should be transparent
|
||||||
bool transparent = vischeck && ent_data.transparent;
|
bool transparent = vischeck && ent_data.transparent;
|
||||||
|
|
||||||
// Bone esp
|
|
||||||
if (draw_bones && type == ENTITY_PLAYER)
|
|
||||||
{
|
|
||||||
const model_t *model = RAW_ENT(ent)->GetModel();
|
|
||||||
if (model)
|
|
||||||
{
|
|
||||||
auto hdr = g_IModelInfo->GetStudiomodel(model);
|
|
||||||
bonelist_map[hdr].Draw(ent, fg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tracers
|
// Tracers
|
||||||
if (tracers && type == ENTITY_PLAYER)
|
if (tracers && type == ENTITY_PLAYER)
|
||||||
{
|
{
|
||||||
|
@ -54,8 +54,9 @@ static CatVar afk(CV_SWITCH, "fb_afk", "1", "Switch target if AFK",
|
|||||||
static CatVar afktime(
|
static CatVar afktime(
|
||||||
CV_INT, "fb_afk_time", "15000", "Max AFK Time",
|
CV_INT, "fb_afk_time", "15000", "Max AFK Time",
|
||||||
"Max time in ms spent standing still before player gets declared afk");
|
"Max time in ms spent standing still before player gets declared afk");
|
||||||
static CatVar corneractivate(CV_SWITCH, "fb_activation_corners", "1", "Activate arround corners",
|
static CatVar corneractivate(
|
||||||
"Try to find an activation path to an entity behind a corner.");
|
CV_SWITCH, "fb_activation_corners", "1", "Activate arround corners",
|
||||||
|
"Try to find an activation path to an entity behind a corner.");
|
||||||
|
|
||||||
// Something to store breadcrumbs created by followed players
|
// Something to store breadcrumbs created by followed players
|
||||||
static std::vector<Vector> breadcrumbs;
|
static std::vector<Vector> breadcrumbs;
|
||||||
@ -102,7 +103,9 @@ void addCrumbs(CachedEntity *target, Vector corner = g_pLocalPlayer->v_Origin)
|
|||||||
int maxiterations = floor(corner.DistTo(g_pLocalPlayer->v_Origin)) / 40;
|
int maxiterations = floor(corner.DistTo(g_pLocalPlayer->v_Origin)) / 40;
|
||||||
for (int i = 0; i < maxiterations; i++)
|
for (int i = 0; i < maxiterations; i++)
|
||||||
{
|
{
|
||||||
breadcrumbs.push_back(g_pLocalPlayer->v_Origin + dist / vectorMax(vectorAbs(dist)) * 40.0f * (i + 1));
|
breadcrumbs.push_back(g_pLocalPlayer->v_Origin +
|
||||||
|
dist / vectorMax(vectorAbs(dist)) * 40.0f *
|
||||||
|
(i + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,34 +113,35 @@ void addCrumbs(CachedEntity *target, Vector corner = g_pLocalPlayer->v_Origin)
|
|||||||
int maxiterations = floor(corner.DistTo(target->m_vecOrigin())) / 40;
|
int maxiterations = floor(corner.DistTo(target->m_vecOrigin())) / 40;
|
||||||
for (int i = 0; i < maxiterations; i++)
|
for (int i = 0; i < maxiterations; i++)
|
||||||
{
|
{
|
||||||
breadcrumbs.push_back(corner + dist / vectorMax(vectorAbs(dist)) * 40.0f * (i + 1));
|
breadcrumbs.push_back(
|
||||||
|
corner + dist / vectorMax(vectorAbs(dist)) * 40.0f * (i + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int ClassPriority(CachedEntity* ent)
|
int ClassPriority(CachedEntity *ent)
|
||||||
{
|
{
|
||||||
switch (g_pPlayerResource->GetClass(ent))
|
switch (g_pPlayerResource->GetClass(ent))
|
||||||
{
|
{
|
||||||
if (g_pPlayerResource->GetClass(ent) == tf_spy)
|
if (g_pPlayerResource->GetClass(ent) == tf_spy)
|
||||||
return 0;
|
return 0;
|
||||||
case tf_engineer:
|
case tf_engineer:
|
||||||
return 1;
|
return 1;
|
||||||
case tf_medic:
|
case tf_medic:
|
||||||
return 2;
|
return 2;
|
||||||
case tf_pyro:
|
case tf_pyro:
|
||||||
return 3;
|
return 3;
|
||||||
case tf_scout:
|
case tf_scout:
|
||||||
return 4;
|
return 4;
|
||||||
case tf_sniper:
|
case tf_sniper:
|
||||||
return 5;
|
return 5;
|
||||||
case tf_demoman:
|
case tf_demoman:
|
||||||
return 6;
|
return 6;
|
||||||
case tf_soldier:
|
case tf_soldier:
|
||||||
return 7;
|
return 7;
|
||||||
case tf_heavy:
|
case tf_heavy:
|
||||||
return 8;
|
return 8;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void WorldTick()
|
void WorldTick()
|
||||||
{
|
{
|
||||||
@ -183,7 +187,7 @@ void WorldTick()
|
|||||||
if (CE_BAD(entity)) // Exist + dormant
|
if (CE_BAD(entity)) // Exist + dormant
|
||||||
continue;
|
continue;
|
||||||
if (i == follow_target)
|
if (i == follow_target)
|
||||||
continue;
|
break;
|
||||||
if (entity->m_Type() != ENTITY_PLAYER)
|
if (entity->m_Type() != ENTITY_PLAYER)
|
||||||
continue;
|
continue;
|
||||||
if (steamid != entity->player_info.friendsID) // steamid check
|
if (steamid != entity->player_info.friendsID) // steamid check
|
||||||
@ -193,10 +197,21 @@ void WorldTick()
|
|||||||
continue;
|
continue;
|
||||||
if (corneractivate)
|
if (corneractivate)
|
||||||
{
|
{
|
||||||
Vector indirectOrigin = VischeckWall(LOCAL_E, entity, 250, true); //get the corner location that the future target is visible from
|
Vector indirectOrigin =
|
||||||
if (!indirectOrigin.z) //if we couldn't find it, exit
|
VischeckWall(LOCAL_E, entity, 250,
|
||||||
|
true); // get the corner location that the
|
||||||
|
// future target is visible from
|
||||||
|
if (!indirectOrigin.z) // if we couldn't find it, exit
|
||||||
continue;
|
continue;
|
||||||
|
<<<<<<< Updated upstream
|
||||||
addCrumbs(entity, indirectOrigin);
|
addCrumbs(entity, indirectOrigin);
|
||||||
|
=======
|
||||||
|
breadcrumbs.clear(); // we need to ensure that the breadcrumbs
|
||||||
|
// std::vector is empty
|
||||||
|
breadcrumbs.push_back(indirectOrigin); // add the corner
|
||||||
|
// location to the
|
||||||
|
// breadcrumb list
|
||||||
|
>>>>>>> Stashed changes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -209,10 +224,14 @@ void WorldTick()
|
|||||||
}
|
}
|
||||||
// If we dont have a follow target from that, we look again for someone
|
// If we dont have a follow target from that, we look again for someone
|
||||||
// else who is suitable
|
// else who is suitable
|
||||||
if ((!follow_target || change || (ClassPriority(ENTITY(follow_target)) < 6 && ENTITY(follow_target)->player_info.friendsID != steamid)) && roambot)
|
if ((!follow_target || change ||
|
||||||
|
(ClassPriority(ENTITY(follow_target)) < 6 &&
|
||||||
|
ENTITY(follow_target)->player_info.friendsID != steamid)) &&
|
||||||
|
roambot)
|
||||||
{
|
{
|
||||||
// Try to get a new target
|
// Try to get a new target
|
||||||
auto ent_count = followcart ? HIGHEST_ENTITY : g_IEngine->GetMaxClients();
|
auto ent_count =
|
||||||
|
followcart ? HIGHEST_ENTITY : g_IEngine->GetMaxClients();
|
||||||
for (int i = 0; i < ent_count; i++)
|
for (int i = 0; i < ent_count; i++)
|
||||||
{
|
{
|
||||||
auto entity = ENTITY(i);
|
auto entity = ENTITY(i);
|
||||||
@ -263,8 +282,11 @@ void WorldTick()
|
|||||||
|
|
||||||
if (corneractivate)
|
if (corneractivate)
|
||||||
{
|
{
|
||||||
Vector indirectOrigin = VischeckWall(LOCAL_E, entity, 250, true); //get the corner location that the future target is visible from
|
Vector indirectOrigin =
|
||||||
if (!indirectOrigin.z) //if we couldn't find it, exit
|
VischeckWall(LOCAL_E, entity, 250,
|
||||||
|
true); // get the corner location that the
|
||||||
|
// future target is visible from
|
||||||
|
if (!indirectOrigin.z) // if we couldn't find it, exit
|
||||||
continue;
|
continue;
|
||||||
addCrumbs(entity, indirectOrigin);
|
addCrumbs(entity, indirectOrigin);
|
||||||
}
|
}
|
||||||
@ -273,6 +295,18 @@ void WorldTick()
|
|||||||
if (!VisCheckEntFromEnt(LOCAL_E, entity))
|
if (!VisCheckEntFromEnt(LOCAL_E, entity))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
=======
|
||||||
|
// favor closer entitys
|
||||||
|
if (follow_target &&
|
||||||
|
ENTITY(follow_target)->m_flDistance() >
|
||||||
|
entity->m_flDistance()) // favor closer entitys
|
||||||
|
{
|
||||||
|
if (ClassPriority(ENTITY(follow_target)) >
|
||||||
|
ClassPriority(entity))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
>>>>>>> Stashed changes
|
||||||
|
|
||||||
// ooooo, a target
|
// ooooo, a target
|
||||||
follow_target = i;
|
follow_target = i;
|
||||||
@ -306,11 +340,11 @@ void WorldTick()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(!checkPath()) //wip do not merge if you see this
|
// if(!checkPath()) //wip do not merge if you see this
|
||||||
// {
|
// {
|
||||||
// follow_target = 0;
|
// follow_target = 0;
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Update timer on new target
|
// Update timer on new target
|
||||||
static Timer idle_time{};
|
static Timer idle_time{};
|
||||||
|
@ -53,14 +53,16 @@ void draw()
|
|||||||
CachedEntity *pEntity = ENTITY(i);
|
CachedEntity *pEntity = ENTITY(i);
|
||||||
if (CE_BAD(pEntity) || !pEntity->m_bAlivePlayer())
|
if (CE_BAD(pEntity) || !pEntity->m_bAlivePlayer())
|
||||||
continue;
|
continue;
|
||||||
|
if (pEntity == LOCAL_E)
|
||||||
|
continue;
|
||||||
Vector out;
|
Vector out;
|
||||||
if (draw::WorldToScreen(hitp[i], out))
|
if (draw::WorldToScreen(hitp[i], out))
|
||||||
{
|
{
|
||||||
float size;
|
float size;
|
||||||
if (abs(maxp[i].x - minp[i].x) > abs(maxp[i].y - minp[i].y))
|
Vector pout, pout2;
|
||||||
size = abs(maxp[i].x - minp[i].x);
|
if (draw::WorldToScreen(minp[i], pout) &&
|
||||||
else
|
draw::WorldToScreen(maxp[i], pout2))
|
||||||
size = abs(maxp[i].y - minp[i].y);
|
size = fmaxf(fabsf(pout2.x - pout.x), fabsf(pout2.y - pout.y));
|
||||||
|
|
||||||
glez::draw::rect(out.x, out.y, size / 4, size / 4,
|
glez::draw::rect(out.x, out.y, size / 4, size / 4,
|
||||||
hacks::shared::lightesp::LightESPColor(pEntity));
|
hacks::shared::lightesp::LightESPColor(pEntity));
|
||||||
|
@ -192,7 +192,8 @@ bool canReachVector(Vector loc, Vector dest)
|
|||||||
int maxiterations = floor(dest.DistTo(loc)) / 40;
|
int maxiterations = floor(dest.DistTo(loc)) / 40;
|
||||||
for (int i = 0; i < maxiterations; i++)
|
for (int i = 0; i < maxiterations; i++)
|
||||||
{
|
{
|
||||||
Vector vec = loc + dist / vectorMax(vectorAbs(dist)) * 40.0f * (i + 1);
|
Vector vec =
|
||||||
|
loc + dist / vectorMax(vectorAbs(dist)) * 40.0f * (i + 1);
|
||||||
|
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
Ray_t ray;
|
Ray_t ray;
|
||||||
@ -243,7 +244,8 @@ bool canReachVector(Vector loc, Vector dest)
|
|||||||
down.z = down.z - 50;
|
down.z = down.z - 50;
|
||||||
ray.Init(loc, down);
|
ray.Init(loc, down);
|
||||||
g_ITrace->TraceRay(ray, 0x4200400B, &trace::filter_no_player, &trace);
|
g_ITrace->TraceRay(ray, 0x4200400B, &trace::filter_no_player, &trace);
|
||||||
// higher to avoid small false positives, player can jump 42 hu according to
|
// higher to avoid small false positives, player can jump 42 hu
|
||||||
|
// according to
|
||||||
// the tf2 wiki
|
// the tf2 wiki
|
||||||
if (!(trace.startpos.DistTo(trace.endpos) <= 45))
|
if (!(trace.startpos.DistTo(trace.endpos) <= 45))
|
||||||
return false;
|
return false;
|
||||||
@ -271,7 +273,8 @@ bool canReachVector(Vector loc, Vector dest)
|
|||||||
trace_t trace2;
|
trace_t trace2;
|
||||||
Ray_t ray2;
|
Ray_t ray2;
|
||||||
ray2.Init(loc, directionalLoc);
|
ray2.Init(loc, directionalLoc);
|
||||||
g_ITrace->TraceRay(ray, 0x4200400B, &trace::filter_no_player, &trace2);
|
g_ITrace->TraceRay(ray, 0x4200400B, &trace::filter_no_player,
|
||||||
|
&trace2);
|
||||||
// distance of trace < than 26
|
// distance of trace < than 26
|
||||||
if (trace2.startpos.DistTo(trace2.endpos) < 26.0f)
|
if (trace2.startpos.DistTo(trace2.endpos) < 26.0f)
|
||||||
return false;
|
return false;
|
||||||
@ -984,11 +987,11 @@ bool IsVectorVisible(Vector origin, Vector target, bool enviroment_only)
|
|||||||
trace::filter_no_player.SetSelf(RAW_ENT(g_pLocalPlayer->entity));
|
trace::filter_no_player.SetSelf(RAW_ENT(g_pLocalPlayer->entity));
|
||||||
ray.Init(origin, target);
|
ray.Init(origin, target);
|
||||||
if (!enviroment_only)
|
if (!enviroment_only)
|
||||||
g_ITrace->TraceRay(ray, MASK_SHOT_HULL, &trace::filter_no_player,
|
g_ITrace->TraceRay(ray, MASK_SHOT_HULL, &trace::filter_no_player,
|
||||||
&trace_visible);
|
&trace_visible);
|
||||||
else
|
else
|
||||||
g_ITrace->TraceRay(ray, 0x4200400B, &trace::filter_no_player,
|
g_ITrace->TraceRay(ray, 0x4200400B, &trace::filter_no_player,
|
||||||
&trace_visible);
|
&trace_visible);
|
||||||
|
|
||||||
return (trace_visible.fraction == 1.0f);
|
return (trace_visible.fraction == 1.0f);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
#include <hacks/Aimbot.hpp>
|
||||||
|
#include "MiscTemporary.hpp"
|
||||||
#include "init.hpp"
|
#include "init.hpp"
|
||||||
|
|
||||||
namespace hitrate
|
namespace hitrate
|
||||||
@ -58,7 +60,7 @@ CatCommand debug_ammo("debug_ammo", "Debug ammo", []() {
|
|||||||
logging::Info("%d %d", i, CE_INT(LOCAL_E, netvar.m_iAmmo + i * 4));
|
logging::Info("%d %d", i, CE_INT(LOCAL_E, netvar.m_iAmmo + i * 4));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
std::deque<int> entstocheck{};
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
CachedEntity *weapon = LOCAL_W;
|
CachedEntity *weapon = LOCAL_W;
|
||||||
@ -67,14 +69,50 @@ void Update()
|
|||||||
if (LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifle) ||
|
if (LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifle) ||
|
||||||
LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifleDecap))
|
LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifleDecap))
|
||||||
{
|
{
|
||||||
|
/*INetChannel *ch = (INetChannel *)g_IEngine->GetNetChannelInfo();
|
||||||
|
static int prevhits = count_hits;
|
||||||
|
int latency = ch->GetAvgLatency(MAX_FLOWS) * 1000 + 0.5f;
|
||||||
|
if (hacks::shared::aimbot::target_eid != -1 && !timers[hacks::shared::aimbot::target_eid].check(latency))
|
||||||
|
{
|
||||||
|
if (count_hits > prevhits)
|
||||||
|
{
|
||||||
|
prevhits = count_hits;
|
||||||
|
timers[hacks::shared::aimbot::target_eid].update();
|
||||||
|
}
|
||||||
|
}*/
|
||||||
// ONLY tracks primary ammo
|
// ONLY tracks primary ammo
|
||||||
int ammo = CE_INT(LOCAL_E, netvar.m_iAmmo + 4);
|
int ammo = CE_INT(LOCAL_E, netvar.m_iAmmo + 4);
|
||||||
|
|
||||||
if (lastweapon)
|
if (lastweapon)
|
||||||
{
|
{
|
||||||
if (ammo < lastammo)
|
if (ammo < lastammo)
|
||||||
{
|
{
|
||||||
OnShot();
|
//for (auto i : entstocheck)
|
||||||
|
//{
|
||||||
|
OnShot();
|
||||||
|
/*static int prevent = 0;
|
||||||
|
|
||||||
|
if (hacks::shared::aimbot::target_eid != prevent)
|
||||||
|
{
|
||||||
|
entstocheck.push_back(hacks::shared::aimbot::target_eid);
|
||||||
|
prevent = hacks::shared::aimbot::target_eid;
|
||||||
|
timers[hacks::shared::aimbot::target_eid].update();
|
||||||
|
}
|
||||||
|
if (i != -1)
|
||||||
|
{
|
||||||
|
if (timers[i].test_and_set(latency))
|
||||||
|
{
|
||||||
|
bruteint[i]++;
|
||||||
|
entstocheck[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
/*else if (timers[hacks::shared::aimbot::target_eid].check(latency / 2))
|
||||||
|
{
|
||||||
|
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
lastweapon = weapon->m_IDX;
|
lastweapon = weapon->m_IDX;
|
||||||
lastammo = ammo;
|
lastammo = ammo;
|
||||||
@ -91,7 +129,7 @@ class HurtListener : public IGameEventListener
|
|||||||
public:
|
public:
|
||||||
virtual void FireGameEvent(KeyValues *event)
|
virtual void FireGameEvent(KeyValues *event)
|
||||||
{
|
{
|
||||||
if (strcmp("player_hurt", event->GetName()))
|
if (strcmp("player_hurt", event->GetName()) || strcmp("player_death", event->GetName()))
|
||||||
return;
|
return;
|
||||||
if (g_IEngine->GetPlayerForUserID(event->GetInt("attacker")) ==
|
if (g_IEngine->GetPlayerForUserID(event->GetInt("attacker")) ==
|
||||||
g_IEngine->GetLocalPlayer())
|
g_IEngine->GetLocalPlayer())
|
||||||
@ -99,7 +137,7 @@ public:
|
|||||||
if (CE_GOOD(LOCAL_W) &&
|
if (CE_GOOD(LOCAL_W) &&
|
||||||
(LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifle) ||
|
(LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifle) ||
|
||||||
LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifleDecap)))
|
LOCAL_W->m_iClassID() == CL_CLASS(CTFSniperRifleDecap)))
|
||||||
OnHit(event->GetBool("crit"));
|
OnHit(strcmp("player_death", event->GetName()) ? event->GetBool("crit") : false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -304,7 +304,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
*bSendPackets = true;
|
|
||||||
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon()))
|
if (!g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->weapon()))
|
||||||
{
|
{
|
||||||
#if not LAGBOT_MODE
|
#if not LAGBOT_MODE
|
||||||
@ -347,26 +346,24 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
PROF_SECTION(CM_aimbot);
|
PROF_SECTION(CM_aimbot);
|
||||||
hacks::shared::aimbot::CreateMove();
|
hacks::shared::aimbot::CreateMove();
|
||||||
}
|
}
|
||||||
IF_GAME(IsTF2())
|
|
||||||
{
|
|
||||||
PROF_SECTION(CM_antibackstab);
|
|
||||||
hacks::tf2::antibackstab::CreateMove();
|
|
||||||
}
|
|
||||||
static int attackticks = 0;
|
static int attackticks = 0;
|
||||||
if (g_pUserCmd->buttons & IN_ATTACK)
|
if (g_pUserCmd->buttons & IN_ATTACK)
|
||||||
++attackticks;
|
++attackticks;
|
||||||
else
|
else
|
||||||
attackticks = 0;
|
attackticks = 0;
|
||||||
if (semiauto)
|
if (semiauto)
|
||||||
{
|
|
||||||
if (g_pUserCmd->buttons & IN_ATTACK)
|
if (g_pUserCmd->buttons & IN_ATTACK)
|
||||||
{
|
|
||||||
if (attackticks % int(semiauto) < int(semiauto) - 1)
|
if (attackticks % int(semiauto) < int(semiauto) - 1)
|
||||||
{
|
|
||||||
g_pUserCmd->buttons &= ~IN_ATTACK;
|
g_pUserCmd->buttons &= ~IN_ATTACK;
|
||||||
}
|
static int fakelag_queue = 0;
|
||||||
|
if (CE_GOOD(LOCAL_E))
|
||||||
|
if (fakelag_amount)
|
||||||
|
{
|
||||||
|
*bSendPackets = int(fakelag_amount) == fakelag_queue;
|
||||||
|
fakelag_queue++;
|
||||||
|
if (fakelag_queue > int(fakelag_amount))
|
||||||
|
fakelag_queue = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_antiaim);
|
PROF_SECTION(CM_antiaim);
|
||||||
hacks::shared::antiaim::ProcessUserCmd(cmd);
|
hacks::shared::antiaim::ProcessUserCmd(cmd);
|
||||||
@ -396,6 +393,11 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
hacks::tf::autoheal::CreateMove();
|
hacks::tf::autoheal::CreateMove();
|
||||||
}
|
}
|
||||||
IF_GAME(IsTF2())
|
IF_GAME(IsTF2())
|
||||||
|
{
|
||||||
|
PROF_SECTION(CM_antibackstab);
|
||||||
|
hacks::tf2::antibackstab::CreateMove();
|
||||||
|
}
|
||||||
|
IF_GAME(IsTF2())
|
||||||
{
|
{
|
||||||
PROF_SECTION(CM_autobackstab);
|
PROF_SECTION(CM_autobackstab);
|
||||||
hacks::tf2::autobackstab::CreateMove();
|
hacks::tf2::autobackstab::CreateMove();
|
||||||
@ -466,24 +468,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
hacks::shared::backtrack::UpdateIncomingSequences();
|
hacks::shared::backtrack::UpdateIncomingSequences();
|
||||||
if (CE_GOOD(g_pLocalPlayer->entity))
|
if (CE_GOOD(g_pLocalPlayer->entity))
|
||||||
{
|
{
|
||||||
static int fakelag_queue = 0;
|
|
||||||
if (fakelag_amount)
|
|
||||||
{
|
|
||||||
if (fakelag_queue == int(fakelag_amount) ||
|
|
||||||
(g_pUserCmd->buttons & IN_ATTACK))
|
|
||||||
{
|
|
||||||
*bSendPackets = true;
|
|
||||||
}
|
|
||||||
else if (fakelag_queue < int(fakelag_amount))
|
|
||||||
{
|
|
||||||
*bSendPackets = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fakelag_queue = 0;
|
|
||||||
}
|
|
||||||
fakelag_queue++;
|
|
||||||
}
|
|
||||||
speedapplied = false;
|
speedapplied = false;
|
||||||
if (roll_speedhack &&
|
if (roll_speedhack &&
|
||||||
g_IInputSystem->IsButtonDown(
|
g_IInputSystem->IsButtonDown(
|
||||||
@ -524,7 +508,10 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
|||||||
|
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
if (cmd)
|
if (cmd &&
|
||||||
|
(cmd->buttons & IN_ATTACK ||
|
||||||
|
!(hacks::shared::antiaim::enabled &&
|
||||||
|
float(hacks::shared::antiaim::yaw_mode) >= 9 && !*bSendPackets)))
|
||||||
g_Settings.last_angles = cmd->viewangles;
|
g_Settings.last_angles = cmd->viewangles;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,55 +9,56 @@
|
|||||||
#if not LAGBOT_MODE
|
#if not LAGBOT_MODE
|
||||||
#include "hacks/Backtrack.hpp"
|
#include "hacks/Backtrack.hpp"
|
||||||
#endif
|
#endif
|
||||||
static CatVar resolver(CV_SWITCH, "resolver", "0", "Resolve angles");
|
|
||||||
static CatVar nightmode(CV_SWITCH, "nightmode", "0", "Enable nightmode", "");
|
static CatVar nightmode(CV_FLOAT, "nightmode", "0", "Enable nightmode", "");
|
||||||
namespace hooked_methods
|
namespace hooked_methods
|
||||||
{
|
{
|
||||||
|
|
||||||
DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_,
|
DEFINE_HOOKED_METHOD(FrameStageNotify, void, void *this_,
|
||||||
ClientFrameStage_t stage)
|
ClientFrameStage_t stage)
|
||||||
{
|
{
|
||||||
if (nightmode)
|
static float OldNightmode = 0.0f;
|
||||||
|
if (OldNightmode != (float) nightmode)
|
||||||
{
|
{
|
||||||
static int OldNightmode = 0;
|
|
||||||
if (OldNightmode != (int) nightmode)
|
static ConVar *r_DrawSpecificStaticProp =
|
||||||
|
g_ICvar->FindVar("r_DrawSpecificStaticProp");
|
||||||
|
if (!r_DrawSpecificStaticProp)
|
||||||
{
|
{
|
||||||
|
r_DrawSpecificStaticProp =
|
||||||
static ConVar *r_DrawSpecificStaticProp =
|
|
||||||
g_ICvar->FindVar("r_DrawSpecificStaticProp");
|
g_ICvar->FindVar("r_DrawSpecificStaticProp");
|
||||||
if (!r_DrawSpecificStaticProp)
|
return;
|
||||||
{
|
|
||||||
r_DrawSpecificStaticProp =
|
|
||||||
g_ICvar->FindVar("r_DrawSpecificStaticProp");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
r_DrawSpecificStaticProp->SetValue(0);
|
|
||||||
|
|
||||||
for (MaterialHandle_t i = g_IMaterialSystem->FirstMaterial();
|
|
||||||
i != g_IMaterialSystem->InvalidMaterial();
|
|
||||||
i = g_IMaterialSystem->NextMaterial(i))
|
|
||||||
{
|
|
||||||
IMaterial *pMaterial = g_IMaterialSystem->GetMaterial(i);
|
|
||||||
|
|
||||||
if (!pMaterial)
|
|
||||||
continue;
|
|
||||||
if (strstr(pMaterial->GetTextureGroupName(), "World") ||
|
|
||||||
strstr(pMaterial->GetTextureGroupName(), "StaticProp"))
|
|
||||||
{
|
|
||||||
if (nightmode)
|
|
||||||
{
|
|
||||||
if (strstr(pMaterial->GetTextureGroupName(),
|
|
||||||
"StaticProp"))
|
|
||||||
pMaterial->ColorModulate(0.3f, 0.3f, 0.3f);
|
|
||||||
else
|
|
||||||
pMaterial->ColorModulate(0.05f, 0.05f, 0.05f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pMaterial->ColorModulate(1.0f, 1.0f, 1.0f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
OldNightmode = nightmode;
|
|
||||||
}
|
}
|
||||||
|
r_DrawSpecificStaticProp->SetValue(0);
|
||||||
|
|
||||||
|
for (MaterialHandle_t i = g_IMaterialSystem->FirstMaterial();
|
||||||
|
i != g_IMaterialSystem->InvalidMaterial();
|
||||||
|
i = g_IMaterialSystem->NextMaterial(i))
|
||||||
|
{
|
||||||
|
IMaterial *pMaterial = g_IMaterialSystem->GetMaterial(i);
|
||||||
|
|
||||||
|
if (!pMaterial)
|
||||||
|
continue;
|
||||||
|
if (strstr(pMaterial->GetTextureGroupName(), "World") ||
|
||||||
|
strstr(pMaterial->GetTextureGroupName(), "StaticProp"))
|
||||||
|
{
|
||||||
|
if (float(nightmode) > 0.0f)
|
||||||
|
{
|
||||||
|
if (strstr(pMaterial->GetTextureGroupName(), "StaticProp"))
|
||||||
|
pMaterial->ColorModulate(1.0f - float(nightmode) / 100.0f,
|
||||||
|
1.0f - float(nightmode) / 100.0f,
|
||||||
|
1.0f - float(nightmode) / 100.0f);
|
||||||
|
else
|
||||||
|
pMaterial->ColorModulate(
|
||||||
|
(1.0f - float(nightmode) / 100.0f) / 6.0f,
|
||||||
|
(1.0f - float(nightmode) / 100.0f) / 6.0f,
|
||||||
|
(1.0f - float(nightmode) / 100.0f) / 6.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pMaterial->ColorModulate(1.0f, 1.0f, 1.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OldNightmode = nightmode;
|
||||||
}
|
}
|
||||||
static IClientEntity *ent;
|
static IClientEntity *ent;
|
||||||
|
|
||||||
|
@ -15,6 +15,17 @@ CatVar no_zoom(CV_SWITCH, "no_zoom", "0", "Disable scope",
|
|||||||
"Disables black scope overlay");
|
"Disables black scope overlay");
|
||||||
static CatVar pure_bypass(CV_SWITCH, "pure_bypass", "0", "Pure Bypass",
|
static CatVar pure_bypass(CV_SWITCH, "pure_bypass", "0", "Pure Bypass",
|
||||||
"Bypass sv_pure");
|
"Bypass sv_pure");
|
||||||
|
int spamdur = 0;
|
||||||
|
Timer joinspam{};
|
||||||
|
CatCommand join_spam("join_spam",
|
||||||
|
"Spam joins server for X seconds",
|
||||||
|
[](const CCommand &args) {
|
||||||
|
if (args.ArgC() < 1)
|
||||||
|
return;
|
||||||
|
int id = atoi(args.Arg(1));
|
||||||
|
joinspam.update();
|
||||||
|
spamdur = id;
|
||||||
|
});
|
||||||
void *pure_orig = nullptr;
|
void *pure_orig = nullptr;
|
||||||
void **pure_addr = nullptr;
|
void **pure_addr = nullptr;
|
||||||
|
|
||||||
@ -27,6 +38,34 @@ static CatVar
|
|||||||
static CatVar no_reportlimit(CV_SWITCH, "no_reportlimit", "0",
|
static CatVar no_reportlimit(CV_SWITCH, "no_reportlimit", "0",
|
||||||
"no report limit",
|
"no report limit",
|
||||||
"Remove playerlist report time limit");
|
"Remove playerlist report time limit");
|
||||||
|
// static CatVar disable_ban_tf(CV_SWITCH, "disable_mm_ban", "0", "Disable MM
|
||||||
|
// ban", "Disable matchmaking ban");
|
||||||
|
// static CatVar party_bypass(CV_SWITCH, "party_bypass", "0", "Party bypass",
|
||||||
|
// "Bypass the have to be friended restrictions on party");
|
||||||
|
/*void JoinParty(uint32 steamid)
|
||||||
|
{
|
||||||
|
CSteamID id(steamid, EUniverse::k_EUniversePublic,
|
||||||
|
EAccountType::k_EAccountTypeIndividual);
|
||||||
|
}
|
||||||
|
CatCommand join_party("join_party", "Join this players party (steamid3, no U:1:
|
||||||
|
and no [])", [](const CCommand &args) {
|
||||||
|
if (args.ArgC() < 1)
|
||||||
|
{
|
||||||
|
g_ICvar->ConsolePrintf("Please give a steamid3, thanks.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string tofind(args.Arg(1));
|
||||||
|
if (tofind.find("[U:1:") || tofind.find("]"))
|
||||||
|
g_ICvar->ConsolePrintf("Invalid steamid3. Please remove the [U:1 and the
|
||||||
|
].\n");
|
||||||
|
unsigned int id = atol(args.Arg(1));
|
||||||
|
if (!id)
|
||||||
|
g_ICvar->ConsolePrintf("Invalid steamid3.\n");
|
||||||
|
else
|
||||||
|
JoinParty(id);
|
||||||
|
});*/
|
||||||
|
|
||||||
bool replaced = false;
|
bool replaced = false;
|
||||||
namespace hooked_methods
|
namespace hooked_methods
|
||||||
{
|
{
|
||||||
@ -46,10 +85,74 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_,
|
|||||||
|
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
if (!textures_loaded)
|
if (!textures_loaded)
|
||||||
{
|
|
||||||
textures_loaded = true;
|
textures_loaded = true;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
static bool switcherido = false;
|
||||||
|
if (switcherido && spamdur && !joinspam.check(spamdur * 1000))
|
||||||
|
{
|
||||||
|
auto gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||||
|
if (!gc)
|
||||||
|
goto label1;
|
||||||
|
gc->JoinMMMatch();
|
||||||
|
}
|
||||||
|
else if (!joinspam.check(spamdur * 1000) && spamdur)
|
||||||
|
{
|
||||||
|
INetChannel *ch = (INetChannel *)g_IEngine->GetNetChannelInfo();
|
||||||
|
if (!ch)
|
||||||
|
goto label1;
|
||||||
|
ch->Shutdown("GET GOOD GET CATHOOK");
|
||||||
|
}
|
||||||
|
label1:
|
||||||
|
/*static bool replacedparty = false;
|
||||||
|
if (party_bypass && !replacedparty)
|
||||||
|
{
|
||||||
|
static unsigned char patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
|
||||||
|
static unsigned char patch2[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
|
||||||
|
static unsigned char patch3[] = { 0x90, 0x90};
|
||||||
|
static unsigned char patch4[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
|
||||||
|
uintptr_t addr = gSignatures.GetClientSignature("0F 84 ? ? ? ? 8B 7B ?
|
||||||
|
8D 45");
|
||||||
|
uintptr_t addr2 = gSignatures.GetClientSignature("0F 8F ? ? ? ? 80 BD ?
|
||||||
|
? ? ? ? 0F 84 ? ? ? ? 80 BD");
|
||||||
|
uintptr_t addr3 = gSignatures.GetClientSignature("74 ? E8 ? ? ? ? 89
|
||||||
|
F1");
|
||||||
|
uintptr_t addr4 = gSignatures.GetClientSignature("0F 84 ? ? ? ? 8B 45 ?
|
||||||
|
8B 70 ? 8B 78 ? 8D 45");
|
||||||
|
uintptr_t addr5 = gSignatures.GetClientSignature("89 C6 74 ? 8B 43 ? 85
|
||||||
|
C0 74 ? 8B 10");
|
||||||
|
if (addr && addr2 && addr3 && addr4 && addr5)
|
||||||
|
{
|
||||||
|
logging::Info("Party bypass: 0x%08X, 0x%08X, 0x%08X, 0x%08X", addr,
|
||||||
|
addr2, addr3, addr4);
|
||||||
|
Patch((void*) addr, (void *) patch, sizeof(patch));
|
||||||
|
Patch((void*) addr2, (void *) patch2, sizeof(patch2));
|
||||||
|
Patch((void*) addr3, (void *) patch3, sizeof(patch3));
|
||||||
|
Patch((void*) addr4, (void *) patch4, sizeof(patch4));
|
||||||
|
replacedparty = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
logging::Info("No Party bypass Signature");
|
||||||
|
}
|
||||||
|
static bool replacedban = false;
|
||||||
|
if (disable_ban_tf && !replacedban)
|
||||||
|
{
|
||||||
|
static unsigned char patch[] = { 0x31, 0xe0 };
|
||||||
|
static unsigned char patch2[] = { 0xb0, 0x01, 0x90 };
|
||||||
|
uintptr_t addr = gSignatures.GetClientSignature("31 C0 5B 5E 5F 5D C3 8D
|
||||||
|
B6 00 00 00 00 BA");
|
||||||
|
uintptr_t addr2 = gSignatures.GetClientSignature("0F 92 C0 83 C4 ? 5B 5E
|
||||||
|
5F 5D C3 8D B4 26 00 00 00 00 83 C4");
|
||||||
|
if (addr && addr2)
|
||||||
|
{
|
||||||
|
logging::Info("MM Banned: 0x%08x, 0x%08x", addr, addr2);
|
||||||
|
Patch((void*) addr, (void *) patch, sizeof(patch));
|
||||||
|
Patch((void*) addr2, (void *) patch2, sizeof(patch2));
|
||||||
|
replacedban = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
logging::Info("No disable ban Signature");
|
||||||
|
|
||||||
|
}*/
|
||||||
if (no_reportlimit && !replaced)
|
if (no_reportlimit && !replaced)
|
||||||
{
|
{
|
||||||
static unsigned char patch[] = { 0xB8, 0x01, 0x00, 0x00, 0x00 };
|
static unsigned char patch[] = { 0xB8, 0x01, 0x00, 0x00, 0x00 };
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
|
||||||
CatCommand printfov(
|
CatCommand printfov("fov_print", "Dump achievements to file (development)",
|
||||||
"fov_print", "Dump achievements to file (development)", []() {
|
[]() {
|
||||||
if (CE_GOOD(LOCAL_E))
|
if (CE_GOOD(LOCAL_E))
|
||||||
logging::Info("%d", CE_INT(LOCAL_E, netvar.iFOV));
|
logging::Info("%d", CE_INT(LOCAL_E, netvar.iFOV));
|
||||||
});
|
});
|
||||||
void LocalPlayer::Update()
|
void LocalPlayer::Update()
|
||||||
{
|
{
|
||||||
CachedEntity *wep;
|
CachedEntity *wep;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
target_sources(cathook PRIVATE
|
target_sources(cathook PRIVATE
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/C_MannVsMachineStats.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/C_MannVsMachineStats.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/CTFGCClientSystem.cpp"
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/CTFInventoryManager.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/CTFInventoryManager.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/CTFPartyClient.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/CTFPartyClient.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/CTFParty.cpp"
|
"${CMAKE_CURRENT_LIST_DIR}/CTFParty.cpp"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/CTFGCClientSystem.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/ITFGroupMatchCriteria.cpp")
|
"${CMAKE_CURRENT_LIST_DIR}/ITFGroupMatchCriteria.cpp")
|
@ -72,5 +72,16 @@ CTFParty *CTFGCClientSystem::GetParty()
|
|||||||
int CTFGCClientSystem::JoinMMMatch()
|
int CTFGCClientSystem::JoinMMMatch()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
typedef int (*JoinMMMatch_t)(CTFGCClientSystem *);
|
||||||
|
static uintptr_t addr =
|
||||||
|
gSignatures.GetClientSignature("55 89 E5 56 53 83 EC ? 8B 5D ? 0F B6 83 ? ? ? ? 89 C2");
|
||||||
|
if (!addr)
|
||||||
|
{
|
||||||
|
logging::Info("calling NULL!");
|
||||||
|
addr = gSignatures.GetClientSignature(
|
||||||
|
"55 89 E5 56 53 83 EC ? 8B 5D ? 0F B6 83 ? ? ? ? 89 C2");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
static JoinMMMatch_t JoinMMMatch_fn = JoinMMMatch_t(addr);
|
||||||
|
return JoinMMMatch_fn(this);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,9 @@ int re::CTFPartyClient::LoadSavedCasualCriteria()
|
|||||||
{
|
{
|
||||||
typedef int (*LoadSavedCasualCriteria_t)(re::CTFPartyClient *);
|
typedef int (*LoadSavedCasualCriteria_t)(re::CTFPartyClient *);
|
||||||
uintptr_t addr = gSignatures.GetClientSignature(
|
uintptr_t addr = gSignatures.GetClientSignature(
|
||||||
"55 89 E5 8B 45 ? 5D 8B 80 ? ? ? ? C3 66 90 55 89 E5 8B 45 ? 5D 0F B6 80 ? ? ? ? C3 90 55 89 E5 56") - 0x40;
|
"55 89 E5 8B 45 ? 5D 8B 80 ? ? ? ? C3 66 90 55 89 E5 "
|
||||||
|
"8B 45 ? 5D 0F B6 80 ? ? ? ? C3 90 55 89 E5 56") -
|
||||||
|
0x40;
|
||||||
LoadSavedCasualCriteria_t LoadSavedCasualCriteria_fn =
|
LoadSavedCasualCriteria_t LoadSavedCasualCriteria_fn =
|
||||||
LoadSavedCasualCriteria_t(addr);
|
LoadSavedCasualCriteria_t(addr);
|
||||||
|
|
||||||
|
2
src/trace.cpp
Executable file → Normal file
2
src/trace.cpp
Executable file → Normal file
@ -79,7 +79,7 @@ void trace::FilterNoPlayer::SetSelf(IClientEntity *self)
|
|||||||
|
|
||||||
bool trace::FilterNoPlayer::ShouldHitEntity(IHandleEntity *handle, int mask)
|
bool trace::FilterNoPlayer::ShouldHitEntity(IHandleEntity *handle, int mask)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
IClientEntity *entity;
|
IClientEntity *entity;
|
||||||
ClientClass *clazz;
|
ClientClass *clazz;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user