Пользователь
-
Автор темы
- #1
Onetap v2 autostop.
C++:
void c_aimbot::aim( )
{
// aimbot start
if ( ctx.m_settings.ragebot_autostop[ weapon->get_type( ) ] && !weapon->is_non_aim( ) )
{
float forward_move = ctx.m_cmd->m_move_dir.x;
float side_move = ctx.m_cmd->m_move_dir.y;
vec3 velocity = ctx.m_local->velocity( );
float velocity_length = velocity.length_2d( );
if ( ctx.m_settings.ragebot_autostop_between_shots[ weapon->get_type( ) ] && weapon->can_fire( ) )
{
float accuracy_speed = weapon->max_speed( ) * 0.33f;
if ( velocity_length <= accuracy_speed + 1.0 )
{
float move_length = ctx.m_cmd->m_move_dir.length( );
float move_length_2d = ctx.m_cmd->m_move_dir.length_2d( );
if ( move_length > 0.0 )
{
ctx.m_cmd->m_buttons |= IN_SPEED;
if ( velocity_length <= 0.1 )
{
forward_move *= accuracy_speed;
side_move *= accuracy_speed;
}
else
{
forward_move = ( ctx.m_cmd->m_move_dir.x / move_length_2d ) * accuracy_speed;
side_move = ( ctx.m_cmd->m_move_dir.y / move_length_2d ) * accuracy_speed;
}
}
}
else
{
vec3 velocity_direction;
math::vector_angles( ctx.m_local->velocity( ), &velocity_direction );
velocity_direction.y = ctx.m_cmd->m_viewangles.y - velocity_direction.y;
vec3 move_direction;
math::angle_vectors( velocity_direction, &move_direction );
forward_move = move_direction.x * -450.0f;
side_move = move_direction.y * -450.0f;
}
float new_forward_move = fminf( 450.0f, forward_move );
float new_side_move = fminf( 450.0f, side_move );
if ( new_forward_move <= -450.0f )
ctx.m_cmd->m_move_dir.x = -450.0f;
else
ctx.m_cmd->m_move_dir.x = new_forward_move;
if ( new_side_move <= -450.0f )
ctx.m_cmd->m_move_dir.y = -450.0f;
else
ctx.m_cmd->m_move_dir.y = new_side_move;
}
}
// do your aimbot here
}