yoo bro, i see a big paster)()
-
Автор темы
- #1
Приет всем, делаю ресольвер для лв, такой вопрос: как можно его доделать/исправить?
upd:
C++:
void resolver::resolve_yaw()
{
player_info_t player_info;
if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))
return;
#if RELEASE
if (player_info.fakeplayer || !g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum()) //-V807
#else
if (!g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum())
#endif
{
player_record->side = RESOLVER_ORIGINAL;
return;
}
if (g_ctx.globals.missed_shots[player->EntIndex()]) {
switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
{
case RESOLVER_FIRST:
player_record->type = BRUTEFORCE;
player_record->side == was_second_bruteforce * RESOLVER_SECOND;
was_first_bruteforce = true;
break;
case RESOLVER_SECOND:
player_record->type = BRUTEFORCE;
player_record->side == was_first_bruteforce * RESOLVER_FIRST;
was_second_bruteforce = true;
break;
}
}
auto animstate = player->get_animation_state();
if (!animstate)
{
player_record->side = RESOLVER_ORIGINAL;
return;
}
if (fabs(original_pitch) > 85.0f)
fake = true;
else if (!fake)
{
player_record->side = RESOLVER_ORIGINAL;
return;
}
auto delta = math::normalize_yaw(player->m_angEyeAngles().y - animstate->m_flGoalFeetYaw);
auto valid_lby = true;
if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)
valid_lby = animstate->m_flTimeSinceStartedMoving < 0.22f;
if (fabs(delta) > 29.0f && valid_lby)
{
if (g_ctx.globals.missed_shots[player->EntIndex()])
delta = -delta;
if (delta < 29.0f)
{
player_record->type = LBY;
player_record->side = RESOLVER_LOW_FIRST;
}
else if (delta > -29.0f)
{
player_record->type = LBY;
player_record->side = RESOLVER_LOW_SECOND;
}
}
}
upd:
C++:
case RESOLVER_FIRST:
animstate->m_flGoalFeetYaw = math::normalize_yaw(e->m_angEyeAngles().y + flMaxBodyYaw);