if (g::pLocalEntity->AnimState()->m_bOnGround) {
if (g::pLocalEntity->GetVelocity().Length2D() > 0.1f)
{
g::pLocalEntity->m_body = g::pCmd->viewangles.y;
g::pLocalEntity->m_body_pred = g::pLocalEntity->m_anim_time + 0.22f;
}
else if (g::pLocalEntity->m_anim_time > g::pLocalEntity->m_body_pred)
{
g::pLocalEntity->m_body = g::pCmd->viewangles.y;
g::pLocalEntity->m_body_pred = g::pLocalEntity->m_anim_time + 1.1f;
}
if (g::pLocalEntity->GetVelocity().Length2D() < 0.1) {
if (global_vars->curtime >= (g::pLocalEntity->m_body_pred - g::pLocalEntity->m_anim_frame) && global_vars->curtime < g::pLocalEntity->m_body_pred)
g::pCmd->viewangles.y += 90;
}
}