Гайд AirStrafe booster

Read Only
Read Only
Статус
Оффлайн
Регистрация
16 Май 2025
Сообщения
244
Реакции
51
c_move::air_strafe:
Expand Collapse Copy
/* tbh dont forgot to add in ur create_move stuff to clear sub_tick_movies */
void c_move::air_strafe( valve::base_user_cmd_t& cmd )
{
    if ( !g_menu->main( ).m_move.m_air_strafe.get( )
       || g_local_player->pawn( )->flags( ) & valve::e_ent_flags::on_ground )
        return;
 
    const auto move_services = g_local_player->pawn( )->movement_services( );
    if ( !move_services )
        return;
 
    auto& abs_velocity = g_local_player->pawn( )->abs_velocity( );
    const auto speed = abs_velocity.length( 2u );
    const auto friction = move_services->surface_friction( );
 
    const auto ticks = std::clamp( 12 - cmd.m_sub_tick_moves.size( ), 0, 12 );
    const auto frame_time = valve::k_interval_per_tick / static_cast< float >( ticks );
 
    auto move = move_services->last_movement_impulses( );
    const auto last_move = cmd.m_move;
 
    /* iterate all possible ticks for that shit */
    for ( int i{}; i < ticks; ++i )
    {
        cmd.m_move = last_move;
     
        /* predict next velocity via air_move */
        abs_velocity.z( ) -= ( g_ctx->cvars( ).sv_gravity->get_float( ) * frame_time ) * 0.5f;
        g_game_movement->air_accelerate( abs_velocity, friction, move, frame_time );
        abs_velocity.z( ) += ( g_ctx->cvars( ).sv_gravity->get_float( ) * frame_time );
     
         if ( const auto& sub_tick = valve::g_input->create_sub_tick( ); sub_tick )
         {
             sub_tick->m_when = ( static_cast< float >( i ) / static_cast< float >( ticks ) );
             sub_tick->m_move.x( ) = ( cmd.m_move.x( ) - last_move.x( ) );
             sub_tick->m_move.y( ) = ( cmd.m_move.y( ) - last_move.y( ) );
         
             move.x( ) += sub_tick->m_move.x( );
             move.y( ) += sub_tick->m_move.y( );
         
             cmd.m_sub_tick_moves->add( sub_tick );
         }
    }
}
 
Последнее редактирование:
Congrats! You managed to repost a 7 month old post from unknowncheats.
 
  • Попкорн
Реакции: mj12
Congrats! You managed to repost a 7 month old post from unknowncheats.
ладно, пендос, только вот большинство людей не могут реализовать эту функцию правильно с учетом last_movement_impulses, с правильной функцией air_accelerate/air_move и как бы это смешно
тот пост который на юц немного отличается от моего вот и все
 
Последнее редактирование:
  • Мне нравится
Реакции: mj12
[ QUOTE = "notoffph4ge, post: 3303699, member: 1592018" ]
ok, pendos, only most people can’t implement this function correctly, taking into account last_movement_impulses, with the correct function air_accelerate / air_move and how funny
that post which is a little different from mine, that's all
[ / QUOTE ]

how are you doing air_accel? are you rebuilding parachute accelerate?
 
[ QUOTE = "notoffph4ge, post: 3303699, member: 1592018" ]
ok, pendos, only most people can’t implement this function correctly, taking into account last_movement_impulses, with the correct function air_accelerate / air_move and how funny
that post which is a little different from mine, that's all
[ / QUOTE ]

how are you doing air_accel? are you rebuilding parachute accelerate?
yeah but w/o calculates by stamina tbh this is useless
 
can you share the air_accelerate function? from g_game_movement->air_accelerate(
...thnx
 
Назад
Сверху Снизу