Пользователь
-
Автор темы
- #1
Onetap v2 directional autostrafe
Возможно вронг.
Возможно вронг.
C++:
void OneTap::Features::Misc::AutoStrafe::Directional()
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
float m_flVelocitySquare = (g_pLocalPlayer->m_vecVelocity().x * g_pLocalPlayer->m_vecVelocity().x) + (g_pLocalPlayer->m_vecVelocity().y * g_pLocalPlayer->m_vecVelocity().y);
float m_flVelocityRag2Deg = ((30.0 / m_flVelocitySquare) * 57.29578) * 0.5;
if ((g_pGlobals.UserCmd->m_buttons & IN_JUMP) && m_flVelocitySquare >= 30.0)
{
float m_flRetrackValue = 0.0;
float m_flAbsYaw = g_pLocalPlayer->m_vecVelocity().x * 57.29578;
float m_flYawDirection = 0.0;
bool m_bPositive = false;
if (g_pGlobals.Strafe.StaticNormalize)
m_flRetrackValue = 180.0;
else
m_flRetrackValue = m_flVelocityRag2Deg * ((g_pConfigs.Misc.AutostrafeTurnSpeed / 100.0) + 1.0);
C_SDK::Math::NormalizeAngle(m_flAbsYaw);
if (abs(m_flAbsYaw) <= 1.0)
m_bPositive = g_pGlobals.UserCmd->m_commandNumber & 1;
else
m_bPositive = m_flAbsYaw > 0.0;
if (m_bPositive)
m_flYawDirection = 450.0;
else
m_flYawDirection = -450.0;
g_pGlobals.UserCmd->m_viewAngles.yaw += m_flRetrackValue;
g_pGlobals.UserCmd->m_wishMove.x = 0.0;
g_pGlobals.UserCmd->m_wishMove.y = m_flYawDirection;
float m_flFinalSpeed = m_flVelocityRag2Deg * 0.017453292;
float m_flSecondFinalSpeed = m_flVelocityRag2Deg * 0.017453292;
g_pGlobals.UserCmd->m_wishMove.x = (g_pGlobals.UserCmd->m_wishMove.x * m_flFinalSpeed) - (g_pGlobals.UserCmd->m_wishMove.y * m_flSecondFinalSpeed);
g_pGlobals.UserCmd->m_wishMove.y = (g_pGlobals.UserCmd->m_wishMove.x * m_flSecondFinalSpeed) - (g_pGlobals.UserCmd->m_wishMove.y * m_flFinalSpeed);
g_pGlobals.Strafe.StaticNormalize = false;
}
else
{
g_pGlobals.Strafe.StaticNormalize = true;
}
}