Пользователь
-
Автор темы
- #1
Onetap v2 auto defuse.
Возможно вронг.
Возможно вронг.
C++:
void Miscellaneous::AutoDefuse(CUserCmd* m_pCmd)
{
if (g_pGlobals.pBomb)
{
if (g_pLocalPlayer && g_pLocalPlayer->IsAlive() && g_pLocalPlayer->m_iTeamNum() == 3)
{
float m_flTimeForDefuse = 0.0;
if (g_pLocalPlayer->m_bHasDefuser())
m_flTimeForDefuse = 5.0;
else
m_flTimeForDefuse = 10.0;
float m_iTicksToExplode = TIME_TO_TICKS((g_pGlobals.pBomb->m_flC4Blow() - (g_pGlobalVars->interval_per_tick + m_flTimeForDefuse)));
Vector m_vecLocalOrigin = g_pLocalPlayer->m_vecOrigin();
Vector m_vecBombOrigin = g_pGlobals.pBomb->m_vecOrigin();
if (m_vecLocalOrigin.DistTo(m_vecBombOrigin) < 62.0)
{
if (m_iTicksToExplode < (g_pLocalPlayer->m_nTickbase() + 2))
{
if (g_pConfigs.Misc.AimAtBomb)
{
Vector m_vecBombPos = m_vecBombOrigin - (g_pLocalPlayer->m_vecViewOffset() + m_vecLocalOrigin);
Math::VectorAngles(m_vecBombPos, m_pCmd->m_viewangles);
}
m_pCmd->m_buttons |= IN_USE;
}
}
}
}
}