kill me
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
самый крутой ресольвер под лв из виви)
не бейте
Код:
void resolver::resolve_yaw() // хуйня, я не хочу всё это делать, помогите !!!!!!!!!!!!!!!!!
{
player_info_t player_info;
auto animstate = player->get_animation_state();
if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))
return;
if (player_info.fakeplayer || player->IsDormant() || !g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum()) //-V807
return;
if (!animstate)
return;
// МНЕ ПОХУЙ НА ЭТО
auto idx = player->EntIndex();
// ===========================
bool forward = fabsf(math::normalize_yaw(player->m_angEyeAngles().y - GetForwardYaw(player))) < 90.f;
// ===========================
static float last_anim_update[64];
float desync_amount = player->GetDSYDelta() * 0.87f;
auto full = player->get_animlayers()[3].m_flWeight == 0.0f && player->get_animlayers()[3].m_flCycle == 0.0f;
if (g_ctx.globals.missed_shots[player->EntIndex()] >= 2 || g_ctx.globals.missed_shots[player->EntIndex()] && aim::get().last_target[player->EntIndex()].record.type != LBY)
{
if (g_ctx.globals.missed_shots[idx] == 0 || FreestandSide[idx] == 0)
{
if (player->m_vecVelocity().Length2D() <= 0.1f && full && player->get_animlayers()[6].m_flWeight == 0.0f)
{
FreestandSide[idx] = 2 * (math::AngleDiff(player->m_angEyeAngles().y, AbsYaw()) <= 0.0f) - 1;
last_anim_update[idx] = m_globals()->m_realtime;
desync_amount = 58.f;
}
else if (last_anim_update[idx] + 2.f < m_globals()->m_realtime || FreestandSide[idx] == 0)
StoreAntifreestand(player, &FreestandSide[idx]);
}
}
else
{
switch (g_ctx.globals.missed_shots[idx] % 5) {
case 4:
animstate->m_flGoalFeetYaw = player->m_angEyeAngles().y + (desync_amount * 0.7f) * FreestandSide[idx];
add_to[idx] = FreestandSide[idx] > 0;
break;
case 3:
animstate->m_flGoalFeetYaw = player->m_angEyeAngles().y - (desync_amount * 0.7f) * FreestandSide[idx];
add_to[idx] = FreestandSide[idx] < 0;
break;
case 2:
animstate->m_flGoalFeetYaw = player->m_angEyeAngles().y + (desync_amount * 0.18f) * FreestandSide[idx];
add_to[idx] = FreestandSide[idx] > 0;
break;
case 1:
animstate->m_flGoalFeetYaw = player->m_angEyeAngles().y - desync_amount * FreestandSide[idx];
add_to[idx] = FreestandSide[idx] < 0;
break;
case 0:
animstate->m_flGoalFeetYaw = player->m_angEyeAngles().y + desync_amount * FreestandSide[idx];
add_to[idx] = FreestandSide[idx] > 0;
break;
}
}
}