• Ищем качественного (не новичок) разработчиков Xenforo для этого форума! В идеале, чтобы ты был фулл стек программистом. Если у тебя есть что показать, то свяжись с нами по контактным данным: https://t.me/DREDD

C++ How to improve ur engine prediction

Забаненный
Забаненный
Статус
Оффлайн
Регистрация
1 Ноя 2024
Сообщения
42
Реакции
32
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
we just need to set cl_pred_optimize to 0 so that the game doesn't try to re-predict if it didn't receive a network update or if there were no errors
C++:
Expand Collapse Copy
 // @xrefs: 4C 89 4C 24 20 48 89 4C 24 08 53 55 56 57 41 55 41 56 48 - client.dll
// 89 54 24 10 48 89 4C 24 08 55 53 41 55 41 - client.dll
void c_engine_prediction::update( )
{
    // we dont need to extra prediction, etc
    g_cs2.cl_pred_optimize->set_value( 0 );
   
    // here ur CPrediction::Update.
    return g_cs2.m_prediction->Update( ... );
}
 
Unless you want to remake the whole prediction this is pretty bad, Its better to just leave as it is.
 
Premium code bro
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
actually u dont need to call Update, only client side prediction func(which one in engine2.dll)
by the way, depending on how I looked at what and where it works, you need to call Update in any case due to the fact that in CS2 there is the same problem as in CSGO (prediction dies when fps < tickrate)
 
  • Мне нравится
Реакции: mj12
No need to call it manually, game call it itself in CNetworkGameClient::ClientSidePrediction(engine2.dll)
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Rebuild it then
 
C++:
Expand Collapse Copy
void client_side_prediction(c_network_client* network_game_client, int pred_reason) {
    if (network_game_client->should_predict && network_game_client->delta_tick > 0 && network_game_client->server_tick > 0) {
        const bool in_prediction_bkp = network_game_client->in_prediction;
        network_game_client->in_prediction = true;
        sdk::prediction->update(pred_reason, network_game_client->server_tick);
        network_game_client->in_prediction = in_prediction_bkp;
    }
}

some additional code for ur prediction
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
Expand Collapse Copy
void client_side_prediction(c_network_client* network_game_client, int pred_reason) {
    if (network_game_client->should_predict && network_game_client->delta_tick > 0 && network_game_client->server_tick > 0) {
        const bool in_prediction_bkp = network_game_client->in_prediction;
        network_game_client->in_prediction = true;
        sdk::prediction->update(pred_reason, network_game_client->server_tick);
        network_game_client->in_prediction = in_prediction_bkp;
    }
}

some additional code for ur prediction
u need to set the last argument u currently have server_tick to client_command_tick its null by default
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
I'll explain well
u need to force always the last command for CPrediction::Update and the game does this with all commands
we are getting confused here, because shialex is using a different function. PredictionUpdate has 3 parameters - (void* thisptr, int prediction_reason, int tick)
what do you set them to?
 
Wdym man, i already posted what i use
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
Expand Collapse Copy
void client_side_prediction(c_network_client* network_game_client, int pred_reason) {
    if (network_game_client->should_predict && network_game_client->delta_tick > 0 && network_game_client->server_tick > 0) {
        const bool in_prediction_bkp = network_game_client->in_prediction;
        network_game_client->in_prediction = true;
        sdk::prediction->update(pred_reason, network_game_client->server_tick);
        network_game_client->in_prediction = in_prediction_bkp;
    }
}

some additional code for ur prediction
wrong

C++:
Expand Collapse Copy
you need to do something with tickbase increm**** etc
hint>Runcommand
network_client->m_set_prediction(true);
    {
        auto backup_delta_tick = network_client->m_delta_tick();

        network_client->set_delta_tick(m_pred_data.m_tick_base);
       
        if (network_client->m_delta_tick() > 0)
            hooks::m_run_prediction(network_client, 0);

        network_client->set_delta_tick(backup_delta_tick);
    }
network_client->m_set_prediction(var_in_prediction);
 
  • Попкорн
Реакции: mj12
Назад
Сверху Снизу