-
Автор темы
- #1
Код:
void misc::AutoCrouch(CUserCmd* cmd)
{
if (fakelag::get().condition)
{
g_ctx.globals.fakeducking = false;
return;
}
if (!(g_ctx.local()->m_fFlags() & FL_ONGROUND && engineprediction::get().backup_data.flags & FL_ONGROUND))
{
g_ctx.globals.fakeducking = false;
return;
}
if (m_gamerules()->m_bIsValveDS())
{
g_ctx.globals.fakeducking = false;
return;
}
if (!key_binds::get().get_key_bind_state(20))
{
g_ctx.globals.fakeducking = false;
return;
}
if (!g_cfg.ragebot.fakeduck_fix) {
if (!g_ctx.globals.fakeducking && m_clientstate()->iChokedCommands != 7)
return;
}
else {
if (!g_ctx.globals.fakeducking && m_clientstate()->iChokedCommands != 5)
return;
}
if (!g_cfg.ragebot.fakeduck_fix) {
if (m_clientstate()->iChokedCommands >= 7)
cmd->m_buttons |= IN_DUCK;
else
cmd->m_buttons &= ~IN_DUCK;
}
else {
if (m_clientstate()->iChokedCommands >= 3)
cmd->m_buttons |= IN_DUCK;
else
cmd->m_buttons &= ~IN_DUCK;
}
g_ctx.globals.fakeducking = true;
}