-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Made by me :)
For L.W.
For L.W.
C++:
void misc::double_tap_deffensive(CUserCmd* m_pcmd)
{
if (!g_cfg.ragebot.defensive_doubletap)
return;
const auto local_player = g_ctx.local();
const auto velocity = local_player->m_vecVelocity().Length2D();
if (velocity<local_player->GetMaxPlayerSpeed())
{
g_ctx.globals.m_Peek.m_bIsPeeking = false;
g_ctx.globals.tickbase_shift = 2;
return;
}
const auto active_weapon = local_player->m_hActiveWeapon().Get();
if (!active_weapon || active_weapon->m_iItemDefinitionIndex() == WEAPON_REVOLVER || (m_pcmd->m_buttons & IN_ATTACK))
return;
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;
record.adjust_player();
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;
}
}
++g_ctx.globals.shift_time;
if (g_ctx.globals.shift_time > 15)
g_ctx.globals.shift_time = 0;
if (velocity > local_player->GetMaxPlayerSpeed())
g_ctx.globals.shift_time = local_player->m_fFlags() & FL_ONGROUND ? fourteen;
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)
g_ctx.globals.tickbase_shift = g_ctx.globals.shift_time > 0 ? 14: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;
}
Последнее редактирование: