commit
8678ddb693
@ -32,15 +32,6 @@ struct BacktrackData
|
||||
int index{ 0 };
|
||||
matrix3x4_t bones[128]{};
|
||||
};
|
||||
struct BestTickData
|
||||
{
|
||||
int tickcount{ 0 };
|
||||
int tick{ 0 };
|
||||
bool operator<(const BestTickData &rhs) const
|
||||
{
|
||||
return tickcount < rhs.tickcount;
|
||||
}
|
||||
};
|
||||
void Init();
|
||||
void AddLatencyToNetchan(INetChannel *);
|
||||
void UpdateIncomingSequences();
|
||||
|
@ -21,7 +21,7 @@ static settings::Boolean enable{ "aimbot.enable", "false" };
|
||||
static settings::Button aimkey{ "aimbot.aimkey.button", "<null>" };
|
||||
static settings::Int aimkey_mode{ "aimbot.aimkey.mode", "1" };
|
||||
static settings::Boolean autoshoot{ "aimbot.autoshoot", "1" };
|
||||
static settings::Boolean autoreload{ "aimbot.autoshoot.activate-headmaker", "false" };
|
||||
static settings::Boolean autoreload{ "aimbot.autoshoot.activate-heatmaker", "false" };
|
||||
static settings::Boolean autoshoot_disguised{ "aimbot.autoshoot-disguised", "1" };
|
||||
static settings::Boolean multipoint{ "aimbot.multipoint", "false" };
|
||||
static settings::Int hitbox_mode{ "aimbot.hitbox-mode", "0" };
|
||||
@ -99,7 +99,7 @@ bool IsBacktracking()
|
||||
}
|
||||
|
||||
// Am I holding Hitman's Heatmaker ?
|
||||
static bool CarryingHeadmaker()
|
||||
static bool CarryingHeatmaker()
|
||||
{
|
||||
return CE_INT(LOCAL_W, netvar.iItemDefinitionIndex) == 752;
|
||||
}
|
||||
@ -793,21 +793,7 @@ void Aim(CachedEntity *entity)
|
||||
maxz -= (maxz - minz) / 6;
|
||||
minz += (maxz - minz) / 6;
|
||||
// Create Vectors
|
||||
const Vector positions[13] = {
|
||||
{ minx, centery, minz },
|
||||
{ maxx, centery, minz },
|
||||
{ minx, centery, maxz },
|
||||
{ maxx, centery, maxz },
|
||||
{ centerx, miny, minz },
|
||||
{ centerx, maxy, minz },
|
||||
{ centerx, miny, maxz },
|
||||
{ centerx, maxy, maxz },
|
||||
{ minx, miny, centerz },
|
||||
{ maxx, maxy, centerz },
|
||||
{ minx, miny, centerz },
|
||||
{ maxx, maxy, centerz },
|
||||
hitboxcenter
|
||||
};
|
||||
const Vector positions[13] = { { minx, centery, minz }, { maxx, centery, minz }, { minx, centery, maxz }, { maxx, centery, maxz }, { centerx, miny, minz }, { centerx, maxy, minz }, { centerx, miny, maxz }, { centerx, maxy, maxz }, { minx, miny, centerz }, { maxx, maxy, centerz }, { minx, miny, centerz }, { maxx, maxy, centerz }, hitboxcenter };
|
||||
for (int i = 0; i < 13; ++i)
|
||||
if (IsVectorVisible(g_pLocalPlayer->v_Eye, positions[i]))
|
||||
{
|
||||
@ -926,9 +912,9 @@ void DoAutoshoot()
|
||||
attack = false;
|
||||
|
||||
if (attack)
|
||||
// TO DO: Sending both reload and attack will activate headmakin'
|
||||
// TO DO: Sending both reload and attack will activate the hitmans heatmaker ability
|
||||
// Don't activate it only on first kill (or somehow activate it before shoot)
|
||||
current_user_cmd->buttons |= IN_ATTACK | (*autoreload && CarryingHeadmaker() ? IN_RELOAD : 0);
|
||||
current_user_cmd->buttons |= IN_ATTACK | (*autoreload && CarryingHeatmaker() ? IN_RELOAD : 0);
|
||||
|
||||
if (LOCAL_W->m_iClassID() == CL_CLASS(CTFLaserPointer))
|
||||
current_user_cmd->buttons |= IN_ATTACK2;
|
||||
@ -1049,7 +1035,7 @@ int BestHitbox(CachedEntity *target)
|
||||
IF_GAME(IsTF())
|
||||
{
|
||||
int ci = g_pLocalPlayer->weapon()->m_iClassID();
|
||||
preferred = hitbox_t::pelvis;
|
||||
preferred = hitbox_t::spine_2;
|
||||
// Sniper rifle
|
||||
if (g_pLocalPlayer->holding_sniper_rifle)
|
||||
{
|
||||
@ -1097,7 +1083,7 @@ int BestHitbox(CachedEntity *target)
|
||||
{
|
||||
|
||||
float cdmg = CE_FLOAT(LOCAL_W, netvar.flChargedDamage);
|
||||
float bdmg = CarryingHeadmaker() ? 40 : 50;
|
||||
float bdmg = CarryingHeatmaker() ? 40 : 50;
|
||||
// Darwins damage correction, protects against 15% of damage
|
||||
// if (HasDarwins(target))
|
||||
// {
|
||||
|
@ -24,6 +24,7 @@ static settings::Int slots{ "backtrack.slots", "0" };
|
||||
settings::Boolean enable{ "backtrack.enable", "false" };
|
||||
settings::Boolean backtrack_chams_glow{ "backtrack.chams_glow", "true" };
|
||||
settings::Int latency{ "backtrack.latency", "0" };
|
||||
settings::Boolean enable_latency_rampup{ "backtrack.latency.rampup", "true" };
|
||||
|
||||
void EmptyBacktrackData(BacktrackData &i);
|
||||
std::pair<int, int> getBestEntBestTick();
|
||||
@ -51,19 +52,14 @@ void UpdateIncomingSequences()
|
||||
sequences.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
void AddLatencyToNetchan(INetChannel *ch)
|
||||
{
|
||||
if (!isBacktrackEnabled)
|
||||
return;
|
||||
float Latency = *latency;
|
||||
if (Latency > 1000.0f)
|
||||
Latency = 800.0f;
|
||||
Latency -= getRealLatency();
|
||||
if (Latency < 0.0f)
|
||||
Latency = 0.0f;
|
||||
for (auto &seq : sequences)
|
||||
{
|
||||
if (g_GlobalVars->realtime - seq.curtime > Latency / 1000.0f)
|
||||
if (g_GlobalVars->realtime - seq.curtime > getLatency() / 1000.0f)
|
||||
{
|
||||
ch->m_nInReliableState = seq.inreliablestate;
|
||||
ch->m_nInSequenceNr = seq.sequencenr;
|
||||
@ -84,13 +80,21 @@ int BestTick = -1;
|
||||
int iBestTarget = -1;
|
||||
bool istickvalid[33][66]{};
|
||||
bool istickinvalid[33][66]{};
|
||||
static float latency_rampup = 0.0f;
|
||||
|
||||
static void Run()
|
||||
{
|
||||
if (!shouldBacktrack())
|
||||
{
|
||||
isBacktrackEnabled = false;
|
||||
latency_rampup = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Limit to 2 ticks
|
||||
latency_rampup += 1.0f / 66.0f;
|
||||
latency_rampup = std::min(latency_rampup, 1.0f);
|
||||
|
||||
UpdateIncomingSequences();
|
||||
isBacktrackEnabled = true;
|
||||
|
||||
@ -341,11 +345,11 @@ float getLatency()
|
||||
if (!ch)
|
||||
return 0;
|
||||
float Latency = *latency;
|
||||
if (Latency > 1000.0f)
|
||||
Latency = 800.0f;
|
||||
Latency = std::min(Latency, 800.0f);
|
||||
Latency -= getRealLatency();
|
||||
if (Latency < 0.0f)
|
||||
Latency = 0.0f;
|
||||
Latency = std::max(Latency, 0.0f);
|
||||
if (enable_latency_rampup)
|
||||
Latency = Latency * latency_rampup;
|
||||
return Latency;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ IClientEntity *GetActiveTFWeapon_detour(IClientEntity *this_ /* C_TFPlayer * */)
|
||||
QAngle angle = *(QAngle *) &NET_VECTOR(this_, netvar.angEyeAngles);
|
||||
if (isLocal)
|
||||
{
|
||||
g_IEngine->GetViewAngles(angle);
|
||||
angle = VectorToQAngle(current_user_cmd->viewangles);
|
||||
eyePos = g_pLocalPlayer->v_Eye;
|
||||
}
|
||||
Vector forward;
|
||||
|
@ -350,7 +350,7 @@ void createMove()
|
||||
}
|
||||
}
|
||||
last_index = current_index;
|
||||
std::string spamString = (*source)[current_index];
|
||||
std::string spamString = source->at(current_index);
|
||||
if (FormatSpamMessage(spamString))
|
||||
chat_stack::Say(spamString, *team_only);
|
||||
current_index++;
|
||||
|
@ -183,17 +183,16 @@ void UpdateTemporaryData()
|
||||
|
||||
if (data.connected)
|
||||
{
|
||||
if (CE_GOOD(LOCAL_E))
|
||||
IClientEntity *player = g_IEntityList->GetClientEntity(g_IEngine->GetLocalPlayer());
|
||||
if (player)
|
||||
{
|
||||
IClientEntity *player = RAW_ENT(LOCAL_E);
|
||||
int m_IDX = LOCAL_E->m_IDX;
|
||||
data.ingame.good = true;
|
||||
// TODO kills, deaths, shots, hits, headshots
|
||||
|
||||
int score_saved = data.ingame.score;
|
||||
|
||||
data.ingame.score = g_pPlayerResource->GetScore(m_IDX);
|
||||
data.ingame.team = g_pPlayerResource->GetTeam(m_IDX);
|
||||
data.ingame.score = g_pPlayerResource->GetScore(g_IEngine->GetLocalPlayer());
|
||||
data.ingame.team = g_pPlayerResource->GetTeam(g_IEngine->GetLocalPlayer());
|
||||
data.ingame.role = g_pPlayerResource->GetClass(LOCAL_E);
|
||||
data.ingame.life_state = NET_BYTE(player, netvar.iLifeState);
|
||||
data.ingame.health = NET_INT(player, netvar.iHealth);
|
||||
|
Reference in New Issue
Block a user