Исходник Detect prediction errors and repredict from skeet

Начинающий
Статус
Онлайн
Регистрация
1 Ноя 2024
Сообщения
31
Реакции[?]
23
Поинты[?]
18K
hello YG community its premium pasta from ur favorite skeet(but if tbh we dont need that shit anyway)

c_prediction::detect_prediction_errors:
// detect_pred_errors(int this@<ecx>, double st7_0@<st0>, int a2, int cmd_number, int a4)

if ( m_predicted_cmd_number != cmd_number )
    return;

bool v56{};

if ( m_predicted_tick_base != g_csgo.m_local_player->tick_base( ) )
{
    if ( std::abs( g_csgo.m_global_vars->m_cur_time - g_exploits->charge_time( ) ) > 0.25f )
        v56 = 1;
}

const auto view_punch_angle_delta = std::abs( g_csgo.m_local_player->view_punch( ) - m_predicted_view_punch );
if ( view_punch_angle_delta.x( ) <= 0.03125 )
     g_csgo.m_local_player->view_punch( ).x( ) = m_predicted_view_punch.x( );

const auto aim_punch_angle_delta = std::abs( g_csgo.m_local_player->aim_punch( ) - m_predicted_aim_punch );
if ( aim_punch_angle_delta.x( ) > 0.03125
   || aim_punch_angle_delta.y( ) > 0.03125
   || aim_punch_angle_delta.z( ) > 0.03125 )
{
    m_predicted_aim_punch = g_csgo.m_local_player->aim_punch( );
    v56 = 1;
}

const auto aim_punch_angle_vel_delta = std::abs( g_csgo.m_local_player->aim_punch_vel( ) - m_predicted_aim_punch_vel );
if ( aim_punch_angle_vel_delta.x( ) > 0.03125
   || aim_punch_angle_vel_delta.y( ) > 0.03125
   || aim_punch_angle_vel_delta.z( ) > 0.03125 )
{
    m_predicted_aim_punch_vel = g_csgo.m_local_player->aim_punch_vel( );
    v56 = 1;
}

const auto view_offset_delta = std::abs( g_csgo.m_local_player->view_offset( ) - m_predicted_view_offset );
if ( view_offset_delta.z( ) <= 0.25 )
     g_csgo.m_local_player->view_offset( ).z( ) = m_predicted_view_offset.z( );

const auto origin_delta = g_csgo.m_local_player->origin( ) - m_predicted_origin;
if ( origin_delta.length_sqr( ) < 1.0 )
     g_csgo.m_local_player->origin( ) = m_predicted_origin;

if ( !v56 )
    return;

/*
[I]([/I](v42 + 40) + 12) = -1;
[I]([/I](v42 + 40) + 28) = 0;
[I]([/I](v42 + 40) + 36) = 1;
*/

g_csgo.m_prediction->m_previous_start_frame = -1;
g_csgo.m_prediction->m_cmds_predicted = 0;
g_csgo.m_prediction->m_previous_ack_had_errors = 1;
and how to skeet calls it:
in frame stage notify if stage == 2(FRAME_NET_UPDATE_POSTDATAUPDATE_START)
with this arguments: 1732862101545.png

get_last_ack_cmd is 205 index from virtual table by g_engine interface
 
Последнее редактирование:
Новичок
Статус
Оффлайн
Регистрация
2 Дек 2024
Сообщения
1
Реакции[?]
1
Поинты[?]
1K
hello YG community its premium pasta from ur favorite skeet(but if tbh we dont need that shit anyway)

c_prediction::detect_prediction_errors:
// detect_pred_errors(int this@<ecx>, double st7_0@<st0>, int a2, int cmd_number, int a4)

if ( m_predicted_cmd_number != cmd_number )
    return;

bool v56{};

if ( m_predicted_tick_base != g_csgo.m_local_player->tick_base( ) )
{
    if ( std::abs( g_csgo.m_global_vars->m_cur_time - g_exploits->charge_time( ) ) > 0.25f )
        v56 = 1;
}

const auto view_punch_angle_delta = std::abs( g_csgo.m_local_player->view_punch( ) - m_predicted_view_punch );
if ( view_punch_angle_delta.x( ) <= 0.03125 )
     g_csgo.m_local_player->view_punch( ).x( ) = m_predicted_view_punch.x( );

const auto aim_punch_angle_delta = std::abs( g_csgo.m_local_player->aim_punch( ) - m_predicted_aim_punch );
if ( aim_punch_angle_delta.x( ) > 0.03125
   || aim_punch_angle_delta.y( ) > 0.03125
   || aim_punch_angle_delta.z( ) > 0.03125 )
{
    m_predicted_aim_punch = g_csgo.m_local_player->aim_punch( );
    v56 = 1;
}

const auto aim_punch_angle_vel_delta = std::abs( g_csgo.m_local_player->aim_punch_vel( ) - m_predicted_aim_punch_vel );
if ( aim_punch_angle_vel_delta.x( ) > 0.03125
   || aim_punch_angle_vel_delta.y( ) > 0.03125
   || aim_punch_angle_vel_delta.z( ) > 0.03125 )
{
    m_predicted_aim_punch_vel = g_csgo.m_local_player->aim_punch_vel( );
    v56 = 1;
}

const auto view_offset_delta = std::abs( g_csgo.m_local_player->view_offset( ) - m_predicted_view_offset );
if ( view_offset_delta.z( ) <= 0.25 )
     g_csgo.m_local_player->view_offset( ).z( ) = m_predicted_view_offset.z( );

const auto origin_delta = g_csgo.m_local_player->origin( ) - m_predicted_origin;
if ( origin_delta.length_sqr( ) < 1.0 )
     g_csgo.m_local_player->origin( ) = m_predicted_origin;

if ( !v56 )
    return;

/*
[I]([/I](v42 + 40) + 12) = -1;
[I]([/I](v42 + 40) + 28) = 0;
[I]([/I](v42 + 40) + 36) = 1;
*/

g_csgo.m_prediction->m_previous_start_frame = -1;
g_csgo.m_prediction->m_cmds_predicted = 0;
g_csgo.m_prediction->m_previous_ack_had_errors = 1;
and how to skeet calls it:
in frame stage notify if stage == 2(FRAME_NET_UPDATE_POSTDATAUPDATE_START)
with this arguments: Посмотреть вложение 291593

get_last_ack_cmd is 205 index from virtual table by g_engine interface
Fix netvar compression != "Detect prediction errors"
And the code you posted may break the prediction completely, or it’s some kind of funny antipaste

There is no need to do a repredict; the game itself does it more than once. The correct thing to do would be:
1) Fix the compression of some netvars that may have errors
2) Update prediction before it starts
3) If you use a exploits, compensate for lost ticks

The code is not from the skeet, maybe a very old dump..

rep's :
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Начинающий
Статус
Онлайн
Регистрация
1 Ноя 2024
Сообщения
31
Реакции[?]
23
Поинты[?]
18K
Fix netvar compression != "Detect prediction errors"
And the code you posted may break the prediction completely, or it’s some kind of funny antipaste

There is no need to do a repredict; the game itself does it more than once. The correct thing to do would be:
1) Fix the compression of some netvars that may have errors
2) Update prediction before it starts
3) If you use a exploits, compensate for lost ticks

The code is not from the skeet, maybe a very old dump..

rep's :
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
first its not netvar conpression(skeet store/restore netvars in physicssimulate)
second if u set previous_start_frame to -1, predicted_cmds to 0 and set prev_ack_had_errors to true game then the game will not try to force repredict after this and will not use old network data before the repredict

if you're trying to talk about something u have no idea about, that's ur problem


some screenshots from skeet dump:
its what i post here

1733300443025.png

and where skeet call store & restore netvars
1733300521259.png
Fix netvar compression != "Detect prediction errors"
And the code you posted may break the prediction completely, or it’s some kind of funny antipaste

There is no need to do a repredict; the game itself does it more than once. The correct thing to do would be:
1) Fix the compression of some netvars that may have errors
2) Update prediction before it starts
3) If you use a exploits, compensate for lost ticks

The code is not from the skeet, maybe a very old dump..

rep's :
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Последнее редактирование:
Сверху Снизу