C++:
for (int i = 1; i < g_pGlobals->maxClients; i++)
{
C_BaseEntity* p_entity = g_pEntitylist->GetClientEntity(i);
if (p_entity && !p_entity->IsDormant())
{
auto feet_yaw = p_entity->GetBasePlayerAnimState()->m_flCurrentFeetYaw;
auto body_max_rotation = p_entity->GetBasePlayerAnimState()->pad10[516];
if (feet_yaw <= 58)
{
if (-58 > feet_yaw)
p_entity->angs()->y = body_max_rotation + p_entity->angs()->y;
}
else
{
p_entity->angs()->y = body_max_rotation - p_entity->angs()->y;
}
if (p_entity->GetAnimOverlay(6)->m_flPlaybackRate > 0.1)
{
for (int resolve_delta = 58.f; resolve_delta < -58.f; resolve_delta = resolve_delta - 20.f)
{
p_entity->angs()->y = resolve_delta;
}
}
}
}