void Resolver::ResolveAngles( Player* player, LagComp::LagRecord_t* record ) {
AimPlayer* data = &g_aimbot.m_players[player->index() - 1];
if (!data)
return;
if (!record->m_pState)
return;
const auto info = g_anims.GetAnimationInfo(record->m_pEntity);
if (!info)
return;
// if we are in nospread mode, force all players pitches to down.
// TODO; we should check thei actual pitch and up too, since those are the other 2 possible angles.
// this should be somehow combined into some iteration that matches with the air angle iteration.
auto& lox = inform[player->index() - 1];
CCSGOPlayerAnimState animstate_backup;
animstate_backup = *player->m_PlayerAnimState();
store_delta(player, &lox, record);
*player->m_PlayerAnimState() = animstate_backup;
if (!record->m_bDidShot) {
if (g_cfg[XOR("cheat_mode")].get<int>() == 1) {
switch (data->m_missed_shots % 6) {
case 0:
case 1:
record->m_angEyeAngles.x = player->m_angEyeAngles().x = 90.f;
break;
case 2:
case 3:
record->m_angEyeAngles.x = player->m_angEyeAngles().x = 0.f;
break;
case 4:
case 5:
record->m_angEyeAngles.x = player->m_angEyeAngles().x = -90.f;
break;
default:
break;
}
}
// we arrived here we can do the acutal resolve.
//if (record->m_mode == Modes::RESOLVE_STAND)
if (!game::IsFakePlayer(record->m_iEntIndex))
//ResolveStand(data, record);
{
int пиздец1 = abs(record->m_pLayers[6].m_playback_rate - lox.resolver_anim_layers[0][6].m_playback_rate);
int пиздец2 = abs(record->m_pLayers[6].m_playback_rate - lox.resolver_anim_layers[2][6].m_playback_rate);
int пиздец3 = abs(record->m_pLayers[6].m_playback_rate - lox.resolver_anim_layers[1][6].m_playback_rate);
if (пиздец1 < пиздец2 || пиздец3 <= пиздец2 || (int)(пиздец2 * 1000.f))
{
if (пиздец1 >= пиздец3 && пиздец2 > пиздец3 && !(int)(пиздец3 * 1000.f))
{
last_resolving_side[player->index() - 1] = 1;
record->m_pState->m_flGoalFeetYaw = math::NormalizeYaw(record->m_angEyeAngles.y + 60.0f);
}
}
else
{
last_resolving_side[player->index() - 1] = -1;
record->m_pState->m_flGoalFeetYaw = math::NormalizeYaw(record->m_angEyeAngles.y - 60.0f);
}
}
}
}