Пользователь
-
Автор темы
- #1
Onetap v2 trigger balance adjust
Возможно вронг.
Возможно вронг.
C++:
void OneTap::Features::AnimationSystem::TriggerBalanceAdjust(CCSPlayer* player)
{
if (player->GetAnimationLayers())
{
if (player->GetAnimationState())
{
if (player->GetAnimationState()->m_flVelocity <= 1.0)
{
if (player->GetAnimationState()->m_bOnGround)
{
if (!player->GetAnimationState()->m_bOnLadder && !player->GetAnimationState()->m_bInHitGroundAnimation)
{
float m_flUpdateTimeDelta = player->GetAnimationState()->m_flUpdateTimeDelta;
if (m_flUpdateTimeDelta > 0.0)
{
float m_flCurrentFeetYaw = player->GetAnimationState()->m_flCurrentFeetYaw;
float m_flGoalFeetYaw = player->GetAnimationState()->m_flGoalFeetYaw;
float m_flFeetYawDelta = m_flCurrentFeetYaw - m_flGoalFeetYaw;
if (m_flGoalFeetYaw < m_flCurrentFeetYaw)
{
if (m_flFeetYawDelta >= 180.0)
m_flFeetYawDelta = m_flFeetYawDelta - 360.0;
}
else if (m_flFeetYawDelta <= -180.0)
{
m_flFeetYawDelta = m_flFeetYawDelta + 360.0;
}
if ((m_flFeetYawDelta / m_flUpdateTimeDelta) > 120.0)
{
player->GetAnimationLayers()[3].m_flWeight = 0.0;
player->GetAnimationLayers()[3].m_flCycle = 0.0;
player->GetAnimationLayers()[3].m_nSequence = player->GetSequenceActivity(ACT_CSGO_IDLE_TURN_BALANCEADJUST);
}
}
}
}
}
}
}
}