-
Автор темы
- #1
DT:
if (g_cfg.ragebot.defensive_doubletap)
{
if (g_ctx.local()->m_vecVelocity().Length2D() < g_ctx.local()->GetMaxPlayerSpeed())
{
g_ctx.globals.m_Peek.m_bIsPeeking = false;
// break lc
g_ctx.globals.tickbase_shift = 2;
return;
}
// check weapon -- revolver off
const auto pCombatWeapon = g_ctx.local()->m_hActiveWeapon().Get();
if (!pCombatWeapon || pCombatWeapon->m_iItemDefinitionIndex() == WEAPON_REVOLVER || (m_pcmd->m_buttons & IN_ATTACK))
return;
// predpos
Vector predicted_eye_pos = g_ctx.globals.eye_pos + (engineprediction::get().backup_data.velocity * m_globals()->m_intervalpertick);
for (auto i = 1; i <= m_globals()->m_maxclients; i++)
{
auto e = static_cast<player_t*>(m_entitylist()->GetClientEntity(i));
if (!e->valid(true))
continue;
auto records = &player_records[i];
if (records->empty())
continue;
auto record = &records->front();
if (!record->valid())
continue;
// apply player animated data
record->adjust_player();
// look all ticks for get first hitable
for (int next_chock = 1; next_chock <= m_clientstate()->iChokedCommands; ++next_chock)
{
predicted_eye_pos *= next_chock;
auto fire_data = autowall::get().wall_penetration(predicted_eye_pos, e->hitbox_position_matrix(HITBOX_HEAD, record->matrixes_data.first), e);
if (!fire_data.valid || fire_data.damage < 1)
continue;
g_ctx.globals.m_Peek.m_bIsPeeking = true;
}
}
if (++g_ctx.globals.shift_time >= 14)
g_ctx.globals.shift_time = 0;
if (g_ctx.local()->m_vecVelocity().Length2D() > g_ctx.local()->GetMaxPlayerSpeed())
g_ctx.globals.shift_time = g_ctx.local()->m_fFlags() & FL_ONGROUND ? 1 : 4;
if (g_ctx.globals.shift_time > m_clientstate()->iChokedCommands)
std::clamp(g_ctx.globals.shift_time, 1, 2);
if (g_ctx.globals.shift_time > 0) // antipaste
g_ctx.globals.tickbase_shift = g_ctx.globals.shift_time > 0 ? 16 : 0;
if (m_gamerules()->m_bIsValveDS() || g_ctx.globals.m_Peek.m_bIsPeeking)
{
if (!g_ctx.globals.m_Peek.m_bIsPrevPeek)
{
g_ctx.globals.m_Peek.m_bIsPrevPeek = true;
g_ctx.globals.tickbase_shift = 14;
return;
}
}
else
g_ctx.globals.m_Peek.m_bIsPrevPeek = false;
// break lc
g_ctx.globals.tickbase_shift = 2;
// shift time weave hello!
++g_ctx.globals.shift_time = 14;
}