Вопрос Tickbase fix in runcommand

Начинающий
Статус
Оффлайн
Регистрация
8 Дек 2022
Сообщения
4
Реакции[?]
0
Поинты[?]
0
hello, im trying to fix my tickbase in runcommand (lw v3 paste), what im doing is setting shifted command number in createmove, and checking in runcommand if command number == shifted command number, if it is i just backup curtime and set tickbase to tickbase - shifted ticks, everything works perfectly fine, but while having +20 ping doubletap is starting to get slower. i cant figure out why this happens. in cl_showerror 2 i have only tickbase -13 while charging because rn im not fixing tickbase while charging but im like 99% sure its not my problem
 
get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
C++:
if (command number == shifting command number + 1)
    tickbase = backup tickbase + shifted ticks + m_globals()->SimulationTicksThisFrame;
else if (command number == shifting command number)
    tickbase  = backup tickbase - shifted ticks + m_globals()->SimulationTicksThisFrame;
 
Начинающий
Статус
Оффлайн
Регистрация
8 Дек 2022
Сообщения
4
Реакции[?]
0
Поинты[?]
0
C++:
if (command number == shifting command number + 1)
    tickbase = backup tickbase + shifted ticks + m_globals()->SimulationTicksThisFrame;
else if (command number == shifting command number)
    tickbase  = backup tickbase - shifted ticks + m_globals()->SimulationTicksThisFrame;
thanks for replying but sadly it dont fix tickbase for me at all
 
ЧВК EB_LAN
Эксперт
Статус
Оффлайн
Регистрация
26 Янв 2021
Сообщения
1,567
Реакции[?]
522
Поинты[?]
185K
C++:
if (command number == shifting command number + 1)
    tickbase = backup tickbase + shifted ticks + m_globals()->SimulationTicksThisFrame;
else if (command number == shifting command number)
    tickbase  = backup tickbase - shifted ticks + m_globals()->SimulationTicksThisFrame;
shifting command number + 1 == next shifting command number??
 
Забаненный
Статус
Оффлайн
Регистрация
31 Янв 2023
Сообщения
42
Реакции[?]
17
Поинты[?]
1K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
pasta
hello, im trying to fix my tickbase in runcommand (lw v3 paste), what im doing is setting shifted command number in createmove, and checking in runcommand if command number == shifted command number, if it is i just backup curtime and set tickbase to tickbase - shifted ticks, everything works perfectly fine, but while having +20 ping doubletap is starting to get slower. i cant figure out why this happens. in cl_showerror 2 i have only tickbase -13 while charging because rn im not fixing tickbase while charging but im like 99% sure its not my problem
 
Начинающий
Статус
Оффлайн
Регистрация
8 Дек 2022
Сообщения
4
Реакции[?]
0
Поинты[?]
0
pasta

now im getting (1)C_CSPlayer::m_nTickBase - int differs (net 1945 pred 17) diff(-1928) while shifting O_9
C++:
int adjust_player_time_base(int delta) {
    if (delta == -1)
        return false;

    static auto clockcorrection = m_cvar()->FindVar(crypt_str("sv_clockcorrection_msecs"));
    auto flCorrectionSeconds = math::clamp(clockcorrection->GetFloat() / 1000.0f, 0.0f, 1.0f);
    auto correction_ticks = TIME_TO_TICKS(flCorrectionSeconds);

    auto ideal_final_tick = delta + correction_ticks;

    auto estimated_final_tick = g_ctx.local()->m_nTickBase() + 13;

    auto too_fast_limit = ideal_final_tick + correction_ticks;
    auto too_slow_limit = ideal_final_tick - correction_ticks;

    if (estimated_final_tick > too_fast_limit
        || estimated_final_tick > too_slow_limit)
        return ideal_final_tick - 13 + m_globals()->m_simticksthisframe;
}
i think i changed ur code properly, i removed
Код:
valve::g_globals->m_max_client_entites <= 1
because i couldnt find it

im using this code like this at the end of runcommand
Код:
if (m_pcmd->m_command_number == g_ctx.globals.shiftingatm) {
    player->m_nTickBase() = adjust_player_time_base(13);
    m_globals()->m_curtime = backup_curtime;
}
 
get good get legendware
Участник
Статус
Оффлайн
Регистрация
22 Сен 2020
Сообщения
438
Реакции[?]
201
Поинты[?]
48K
now im getting (1)C_CSPlayer::m_nTickBase - int differs (net 1945 pred 17) diff(-1928) while shifting O_9
C++:
int adjust_player_time_base(int delta) {
    if (delta == -1)
        return false;

    static auto clockcorrection = m_cvar()->FindVar(crypt_str("sv_clockcorrection_msecs"));
    auto flCorrectionSeconds = math::clamp(clockcorrection->GetFloat() / 1000.0f, 0.0f, 1.0f);
    auto correction_ticks = TIME_TO_TICKS(flCorrectionSeconds);

    auto ideal_final_tick = delta + correction_ticks;

    auto estimated_final_tick = g_ctx.local()->m_nTickBase() + 13;

    auto too_fast_limit = ideal_final_tick + correction_ticks;
    auto too_slow_limit = ideal_final_tick - correction_ticks;

    if (estimated_final_tick > too_fast_limit
        || estimated_final_tick > too_slow_limit)
        return ideal_final_tick - 13 + m_globals()->m_simticksthisframe;
}
i think i changed ur code properly, i removed
Код:
valve::g_globals->m_max_client_entites <= 1
because i couldnt find it

im using this code like this at the end of runcommand
Код:
if (m_pcmd->m_command_number == g_ctx.globals.shiftingatm) {
    player->m_nTickBase() = adjust_player_time_base(13);
    m_globals()->m_curtime = backup_curtime;
}
delta is the current tickcount and not a fixed number bro, why u setting ur tickbase to always be 13 lmao
 
Начинающий
Статус
Оффлайн
Регистрация
8 Дек 2022
Сообщения
4
Реакции[?]
0
Поинты[?]
0
Забаненный
Статус
Оффлайн
Регистрация
31 Янв 2023
Сообщения
42
Реакции[?]
17
Поинты[?]
1K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
now im getting (1)C_CSPlayer::m_nTickBase - int differs (net 1945 pred 17) diff(-1928) while shifting O_9
C++:
int adjust_player_time_base(int delta) {
    if (delta == -1)
        return false;

    static auto clockcorrection = m_cvar()->FindVar(crypt_str("sv_clockcorrection_msecs"));
    auto flCorrectionSeconds = math::clamp(clockcorrection->GetFloat() / 1000.0f, 0.0f, 1.0f);
    auto correction_ticks = TIME_TO_TICKS(flCorrectionSeconds);

    auto ideal_final_tick = delta + correction_ticks;

    auto estimated_final_tick = g_ctx.local()->m_nTickBase() + 13;

    auto too_fast_limit = ideal_final_tick + correction_ticks;
    auto too_slow_limit = ideal_final_tick - correction_ticks;

    if (estimated_final_tick > too_fast_limit
        || estimated_final_tick > too_slow_limit)
        return ideal_final_tick - 13 + m_globals()->m_simticksthisframe;
}
i think i changed ur code properly, i removed
Код:
valve::g_globals->m_max_client_entites <= 1
because i couldnt find it

im using this code like this at the end of runcommand
Код:
if (m_pcmd->m_command_number == g_ctx.globals.shiftingatm) {
    player->m_nTickBase() = adjust_player_time_base(13);
    m_globals()->m_curtime = backup_curtime;
}
ayo wtf
delta this is server tick_count and if u are shift > 13 ticks than use ur variable for calc ticks to shift aka 13 -> m_shift_amount
and call adjust_player_time_base in create_move before if server sended new data related to it ( client_state->last_out_going_cmd >= g_eng_pred->m_local_data.at( cmd->m_number % 150 ).last_out_going_cmd ) check and than u can apply ur tickbaseee
 
Сверху Снизу