Исходник Velocity graph

Пользователь
Статус
Оффлайн
Регистрация
21 Авг 2020
Сообщения
115
Реакции[?]
45
Поинты[?]
0
C++:
 void c_miscellaneous :: gather_velocity_data (r :: sdk :: c_user_cmd * cmd) {
    const auto local_player = r :: impl :: g_entity_list-> get_by_index <r :: sdk :: c_player *> (r :: impl :: g_engine-> get_local_player ());

    if (! local_player ||! local_player-> alive ())
      return;

    if (data.size ()> 80) // change this to change iter-calculated length on velocity graph or just adapt the function so it
                             // fits more data on various sizes | @c_miscellaneous :: render_velocity_graph - [USER=1292]@UBER[/USER]
      data.pop_back ();

    utils :: velocity_data_t current_data;

    r :: sdk :: vec3_t velocity =
        local_player-> get_velocity (); // used the SDK vector class and added functions I also added to math utilities to it, IDK
                                       // why it exist, was it a include guard issue? - [USER=1292]@UBER[/USER]
    float speed = velocity.length2D ();

    int flags = local_player-> get_flags ();
    bool on_ground =
        flags &
        (1 << 0); // this can be just 1, it's a simple bitfield, but I won't change it unless you decide on doing so - [USER=1292]@UBER[/USER]

    current_data.speed = speed;
    current_data.on_ground = on_ground;

    data.insert (data.begin (), current_data);
  }
void c_menu :: draw_visuals () {
    if (! g_settings-> get <bool> ("show_movement_indicators"))
      return;

    const auto local_player {r :: impl :: g_entity_list-> get_by_index <r :: sdk :: c_player *> (r :: impl :: g_engine-> get_local_player ())};

    if (data.size () <2)
      return;

    if (! local_player ||! local_player-> alive ())
      return;

    int screen_width, screen_height;
    r :: impl :: g_engine-> get_screen_size (screen_width, screen_height);

    for (std :: size_t i = 0; i! = data.size () - 1; i ++) {
      // Gather the needed data
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t current {data [I]};
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t next {data [i + 1]};
      const bool landed {! current.on_ground && next.on_ground};

      const float clamped_current_speed {current.speed};
      const float clamped_next_speed {next.speed};


    }
  }
vec2_t position1 = {{(screen_width / 2) + 200 - (i - 1) * 5}, {(screen_width / 2) + 200 - i * 5}};
      vec2_t position2 = {{(screen_height - 310) + 130 - (clamped_current_speed * 75/320)},
                           {(screen_height - 310) + 130 - (clamped_next_speed * 75/320)}};
[/I]
 
Забаненный
Статус
Оффлайн
Регистрация
14 Окт 2020
Сообщения
91
Реакции[?]
16
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ss?
 
Пользователь
Статус
Оффлайн
Регистрация
21 Авг 2020
Сообщения
115
Реакции[?]
45
Поинты[?]
0
C++:
 void c_miscellaneous::gather_velocity_data( r::sdk::c_user_cmd * cmd ) {
    const auto local_player = r::impl::g_entity_list->get_by_index<r::sdk::c_player *>( r::impl::g_engine->get_local_player( ) );

    if ( !local_player || !local_player->alive( ) )
      return;

    if ( data.size( ) > 80 ) // change this to change iter-calculated length on velocity graph or just adapt the function so it
                             // fits more data on various sizes | @c_miscellaneous::render_velocity_graph - [USER=1292]@UBER[/USER]
      data.pop_back( );

    utils::velocity_data_t current_data;

    r::sdk::vec3_t velocity =
        local_player->get_velocity( ); // used the SDK vector class and added functions I also added to math utilities to it, IDK
                                       // why it exist, was it a include guard issue? - [USER=1292]@UBER[/USER]
    float speed = velocity.length2D ();

    int flags = local_player-> get_flags ();
    bool on_ground =
        flags &
        (1 << 0); // this can be just 1, it's a simple bitfield, but I won't change it unless you decide on doing so - [USER=1292]@UBER[/USER]

    current_data.speed = speed;
    current_data.on_ground = on_ground;

    data.insert (data.begin (), current_data);
  }
void c_menu :: draw_visuals () {
    if (! g_settings-> get <bool> ("show_movement_indicators"))
      return;

    const auto local_player {r :: impl :: g_entity_list-> get_by_index <r :: sdk :: c_player *> (r :: impl :: g_engine-> get_local_player ())};

    if (data.size () <2)
      return;

    if (! local_player ||! local_player-> alive ())
      return;

    int screen_width, screen_height;
    r :: impl :: g_engine-> get_screen_size (screen_width, screen_height);

    for (std :: size_t i = 0; i! = data.size () - 1; i ++) {
      // Gather the needed data
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t current {data [i]};
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t next {data [i + 1]};
      const bool landed {! current.on_ground && next.on_ground};

      const float clamped_current_speed {current.speed};
      const float clamped_next_speed {next.speed};

     // randeaza aici no spoonfeed
    }
  }
vec2_t position1 = {{(screen_width / 2) + 200 - (i - 1) * 5}, {(screen_width / 2) + 200 - i * 5}};
      vec2_t position2 = {{(screen_height - 310) + 130 - (clamped_current_speed * 75/320)},
                           {(screen_height - 310) + 130 - (clamped_next_speed * 75/320)}}; [/ CODE]
 
Эксперт
Статус
Оффлайн
Регистрация
19 Дек 2018
Сообщения
2,957
Реакции[?]
492
Поинты[?]
1K
C++:
 void c_miscellaneous::gather_velocity_data( r::sdk::c_user_cmd * cmd ) {
    const auto local_player = r::impl::g_entity_list->get_by_index<r::sdk::c_player *>( r::impl::g_engine->get_local_player( ) );

    if ( !local_player || !local_player->alive( ) )
      return;

    if ( data.size( ) > 80 ) // change this to change iter-calculated length on velocity graph or just adapt the function so it
                             // fits more data on various sizes | @c_miscellaneous::render_velocity_graph - [USER=1292]@UBER[/USER]
      data.pop_back( );

    utils::velocity_data_t current_data;

    r::sdk::vec3_t velocity =
        local_player->get_velocity( ); // used the SDK vector class and added functions I also added to math utilities to it, IDK
                                       // why it exist, was it a include guard issue? - [USER=1292]@UBER[/USER]
    float speed = velocity.length2D ();

    int flags = local_player-> get_flags ();
    bool on_ground =
        flags &
        (1 << 0); // this can be just 1, it's a simple bitfield, but I won't change it unless you decide on doing so - [USER=1292]@UBER[/USER]

    current_data.speed = speed;
    current_data.on_ground = on_ground;

    data.insert (data.begin (), current_data);
  }
void c_menu :: draw_visuals () {
    if (! g_settings-> get <bool> ("show_movement_indicators"))
      return;

    const auto local_player {r :: impl :: g_entity_list-> get_by_index <r :: sdk :: c_player *> (r :: impl :: g_engine-> get_local_player ())};

    if (data.size () <2)
      return;

    if (! local_player ||! local_player-> alive ())
      return;

    int screen_width, screen_height;
    r :: impl :: g_engine-> get_screen_size (screen_width, screen_height);

    for (std :: size_t i = 0; i! = data.size () - 1; i ++) {
      // Gather the needed data
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t current {data [i]};
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t next {data [i + 1]};
      const bool landed {! current.on_ground && next.on_ground};

      const float clamped_current_speed {current.speed};
      const float clamped_next_speed {next.speed};

     // randeaza aici no spoonfeed
    }
  }
vec2_t position1 = {{(screen_width / 2) + 200 - (i - 1) * 5}, {(screen_width / 2) + 200 - i * 5}};
      vec2_t position2 = {{(screen_height - 310) + 130 - (clamped_current_speed * 75/320)},
                           {(screen_height - 310) + 130 - (clamped_next_speed * 75/320)}}; [/ CODE]
ss we need!!!
 
Бульдозер
Эксперт
Статус
Оффлайн
Регистрация
18 Июл 2019
Сообщения
1,231
Реакции[?]
506
Поинты[?]
0
Ало блять graph это график, хули я вижу его в названии но не вижу в игре?
Ну да, проще отрендерить ебливую циферку чем сделать все нормально как в моей теме
 
Начинающий
Статус
Оффлайн
Регистрация
24 Фев 2019
Сообщения
43
Реакции[?]
23
Поинты[?]
0
stop pasting from parallel dog
C++:
 void c_miscellaneous::gather_velocity_data( r::sdk::c_user_cmd * cmd ) {
    const auto local_player = r::impl::g_entity_list->get_by_index<r::sdk::c_player *>( r::impl::g_engine->get_local_player( ) );

    if ( !local_player || !local_player->alive( ) )
      return;

    if ( data.size( ) > 80 ) // change this to change iter-calculated length on velocity graph or just adapt the function so it
                             // fits more data on various sizes | @c_miscellaneous::render_velocity_graph - [USER=1292]@UBER[/USER]
      data.pop_back( );

    utils::velocity_data_t current_data;

    r::sdk::vec3_t velocity =
        local_player->get_velocity( ); // used the SDK vector class and added functions I also added to math utilities to it, IDK
                                       // why it exist, was it a include guard issue? - [USER=1292]@UBER[/USER]
    float speed = velocity.length2D ();

    int flags = local_player-> get_flags ();
    bool on_ground =
        flags &
        (1 << 0); // this can be just 1, it's a simple bitfield, but I won't change it unless you decide on doing so - [USER=1292]@UBER[/USER]

    current_data.speed = speed;
    current_data.on_ground = on_ground;

    data.insert (data.begin (), current_data);
  }
void c_menu :: draw_visuals () {
    if (! g_settings-> get <bool> ("show_movement_indicators"))
      return;

    const auto local_player {r :: impl :: g_entity_list-> get_by_index <r :: sdk :: c_player *> (r :: impl :: g_engine-> get_local_player ())};

    if (data.size () <2)
      return;

    if (! local_player ||! local_player-> alive ())
      return;

    int screen_width, screen_height;
    r :: impl :: g_engine-> get_screen_size (screen_width, screen_height);

    for (std :: size_t i = 0; i! = data.size () - 1; i ++) {
      // Gather the needed data
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t current {data [i]};
      const r :: itself :: hacks :: c_miscellaneous :: utils :: velocity_data_t next {data [i + 1]};
      const bool landed {! current.on_ground && next.on_ground};

      const float clamped_current_speed {current.speed};
      const float clamped_next_speed {next.speed};

     // randeaza aici no spoonfeed
    }
  }
vec2_t position1 = {{(screen_width / 2) + 200 - (i - 1) * 5}, {(screen_width / 2) + 200 - i * 5}};
      vec2_t position2 = {{(screen_height - 310) + 130 - (clamped_current_speed * 75/320)},
                           {(screen_height - 310) + 130 - (clamped_next_speed * 75/320)}}; [/ CODE]
 
Сверху Снизу