void c_player_resolver::resolve(player_t* p_entity) {
if (g_ctx.m_globals.missed_shots[p_entity->EntIndex()] > 3)
{
for (int i = 1; i < g_csgo.m_globals()->m_maxclients; i++)
{
if (p_entity && !p_entity->IsDormant())
{
auto feet_yaw = p_entity->get_animation_state()->m_flCurrentFeetYaw;
auto body_max_rotation = p_entity->get_animation_state()->pad10[516];
if (feet_yaw <= 58)
{
if (-58 > feet_yaw)
p_entity->m_angEyeAngles().y = body_max_rotation + p_entity->m_angEyeAngles().y;
}
else
{
p_entity->m_angEyeAngles().y = body_max_rotation - p_entity->m_angEyeAngles().y;
}
if (p_entity->get_animlayers()->m_flPlaybackRate > 0.1)
{
for (int resolve_delta = 58.f; resolve_delta < -58.f; resolve_delta = resolve_delta - 20.f)
{
p_entity->m_angEyeAngles().y = resolve_delta;
}
}
}
}
}
else if (g_ctx.m_globals.missed_shots[p_entity->EntIndex()] < 3)
{
for (int i = 1; i <= 65; i++)
{
int angle1[64];
int angle2[64];
int angle3[64];
static float old_simtime[65];
if (g_ctx.send_packet)
angle1[i] = p_entity->m_angEyeAngles().y;
else
angle2[i] = p_entity->m_angEyeAngles().y;
if (angle1[i] != angle2[i])
using_fake_angles[p_entity->EntIndex()] = true;
else
using_fake_angles[p_entity->EntIndex()] = false;
if (using_fake_angles[p_entity->EntIndex()])
{
if (math::angle_distance(angle1[i], angle2[i]) < 59)
{
resolve_type[i] = 0;
p_entity->m_angEyeAngles().y = p_entity->m_flLBYUpdateTime() - math::angle_distance(angle1[i], angle2[i]);
}
}
}
}
}