-
Автор темы
- #1
hvh.cpp -> HVH::AutoDirection:
// iterate players.
for ( int i{ 1 }; i <= g_csgo.m_globals->m_max_clients; ++i ) {
Player* player = g_csgo.m_entlist->GetClientEntity< Player* >( i );
if ( !player || player->dormant( ) || !g_aimbot.IsValidTarget( player ) )
continue;
float fov = math::GetFOV( g_cl.m_view_angles, g_cl.m_shoot_pos, player->WorldSpaceCenter( ) );
if ( fov < target.fov ) {
target.fov = fov;
target.player = player;
}
}
if ( ! target player ) {
if ( m_auto_last > 0.f && m_auto_time > 0.f &&
g_csgo.m_globals->m_curtime < ( m_auto_last + m_auto_time ) ) {
return;
}
m_auto = math::NormalizedAngle( m_view - 180.f );
m_auto_dist = -1.f;
return;
}