Исходник Сливаю придикт скыта

Пользователь
Статус
Оффлайн
Регистрация
12 Июн 2020
Сообщения
465
Реакции[?]
102
Поинты[?]
3K
Код:
#include "prediction_system.h"

void engineprediction::store_netvars()
{
    auto data = &netvars_data[m_clientstate()->iCommandAck % MULTIPLAYER_BACKUP];

    data->tickbase = g_ctx.local()->m_nTickBase();
    data->m_aimPunchAngle = g_ctx.local()->m_aimPunchAngle();
    data->m_aimPunchAngleVel = g_ctx.local()->m_aimPunchAngleVel();
    data->m_viewPunchAngle = g_ctx.local()->m_viewPunchAngle();
    data->m_vecViewOffset = g_ctx.local()->m_vecViewOffset();
    data->m_duckAmount = g_ctx.local()->m_flDuckAmount();
    data->m_duckSpeed = g_ctx.local()->m_flDuckSpeed();
}

void engineprediction::restore_netvars()
{
    auto data = &netvars_data[(m_clientstate()->iCommandAck - 1) % MULTIPLAYER_BACKUP];

    if (data->tickbase != g_ctx.local()->m_nTickBase())
        return;
    int repredict = 0;
    auto aim_punch_angle_delta = g_ctx.local()->m_aimPunchAngle() - data->m_aimPunchAngle;
    auto aim_punch_angle_vel_delta = g_ctx.local()->m_aimPunchAngleVel() - data->m_aimPunchAngleVel;
    auto view_punch_angle_delta = g_ctx.local()->m_viewPunchAngle() - data->m_viewPunchAngle;
    auto view_offset_delta = g_ctx.local()->m_vecViewOffset() - data->m_vecViewOffset;
    auto duck_amount = g_ctx.local()->m_flDuckAmount() - data->m_duckAmount;

    if (fabs(aim_punch_angle_delta.x) > 0.03125f && fabs(aim_punch_angle_delta.y) > 0.03125f && fabs(aim_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngle() = data->m_aimPunchAngle;

    if (fabs(aim_punch_angle_vel_delta.x) > 0.03125f && fabs(aim_punch_angle_vel_delta.y) > 0.03125f && fabs(aim_punch_angle_vel_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngleVel() = data->m_aimPunchAngleVel;

    if (fabs(view_punch_angle_delta.x) > 0.03125f && fabs(view_punch_angle_delta.y) > 0.03125f && fabs(view_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_viewPunchAngle() = data->m_viewPunchAngle;

    if (fabs(view_offset_delta.x) > 0.03125f && fabs(view_offset_delta.y) > 0.03125f && fabs(view_offset_delta.z) > 0.03125f)
        g_ctx.local()->m_vecViewOffset() = data->m_vecViewOffset;

    if (fabs(duck_amount) > 0.03125f)
    {
        g_ctx.local()->m_flDuckAmount() = data->m_duckAmount;
        g_ctx.local()->m_flDuckSpeed() = data->m_duckSpeed;
    }

}

        
    


void engineprediction::setup()
{
    if (prediction_data.prediction_stage != SETUP)
        return;

    backup_data.flags = g_ctx.local()->m_fFlags();
    backup_data.velocity = g_ctx.local()->m_vecVelocity();

    prediction_data.old_curtime = m_globals()->m_curtime;
    prediction_data.old_frametime = m_globals()->m_frametime;

    m_globals()->m_curtime = TICKS_TO_TIME(g_ctx.globals.fixed_tickbase);
    m_globals()->m_frametime = m_prediction()->EnginePaused ? 0.f : m_globals()->m_intervalpertick;

    prediction_data.prediction_stage = PREDICT;
}

void engineprediction::predict(CUserCmd* m_pcmd)
{
    if (prediction_data.prediction_stage != PREDICT)
        return;

    const auto backup_footsteps = m_cvar()->FindVar(crypt_str("sv_footsteps"))->GetInt();

    if (m_clientstate()->iDeltaTick > 0)
        m_prediction()->Update(m_clientstate()->iDeltaTick, true, m_clientstate()->nLastCommandAck, m_clientstate()->nLastOutgoingCommand + m_clientstate()->iChokedCommands);

    if (!prediction_data.prediction_random_seed)
        prediction_data.prediction_random_seed = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("A3 ? ? ? ? 66 0F 6E 86")) + 0x1);

    *prediction_data.prediction_random_seed = MD5_PseudoRandom(m_pcmd->m_command_number) & INT_MAX;

    if (!prediction_data.prediction_player)
        prediction_data.prediction_player = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("89 35 ? ? ? ? F3 0F 10 48")) + 0x2);
    if (!prediction_data.prediction_player)

    *prediction_data.prediction_player = reinterpret_cast <int> (g_ctx.local());

    m_movehelper()->set_host(g_ctx.local());
    m_gamemovement()->StartTrackPredictionErrors(g_ctx.local()); //-V807

    static auto m_nImpulse = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nImpulse"));
    static auto m_nButtons = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nButtons"));
    static auto m_afButtonLast = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonLast"));
    static auto m_afButtonPressed = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonPressed"));
    static auto m_afButtonReleased = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonReleased"));

    if (m_pcmd->m_impulse)
        *reinterpret_cast<uint32_t*>(uint32_t(g_ctx.local()) + m_nImpulse) = m_pcmd->m_impulse;

    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;

    CMoveData move_data;
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
    memset(&move_data, 0, sizeof(CMoveData));

    m_prediction()->SetupMove(g_ctx.local(), m_pcmd, m_movehelper(), &move_data);
    m_gamemovement()->ProcessMovement(g_ctx.local(), &move_data);
    m_prediction()->FinishMove(g_ctx.local(), m_pcmd, &move_data);

    m_gamemovement()->FinishTrackPredictionErrors(g_ctx.local());
    m_movehelper()->set_host(nullptr);

    auto viewmodel = g_ctx.local()->m_hViewModel().Get();

    if (viewmodel)
    {
        viewmodel_data.weapon = viewmodel->m_hWeapon().Get();

        viewmodel_data.viewmodel_index = viewmodel->m_nViewModelIndex();
        viewmodel_data.sequence = viewmodel->m_nSequence();
        viewmodel_data.animation_parity = viewmodel->m_nAnimationParity();

        viewmodel_data.cycle = viewmodel->m_flCycle();
        viewmodel_data.animation_time = viewmodel->m_flAnimTime();
    }
    prediction_data.prediction_stage = FINISH;
}

void engineprediction::finish()
{
    if (prediction_data.prediction_stage != FINISH)
        return;

    *prediction_data.prediction_random_seed = -1;
    *prediction_data.prediction_player = 0;

    m_globals()->m_curtime = prediction_data.old_curtime;
    m_globals()->m_frametime = prediction_data.old_frametime;
}
 
I'm watching you
Участник
Статус
Оффлайн
Регистрация
7 Фев 2020
Сообщения
752
Реакции[?]
241
Поинты[?]
3K
Код:
#include "prediction_system.h"

void engineprediction::store_netvars()
{
    auto data = &netvars_data[m_clientstate()->iCommandAck % MULTIPLAYER_BACKUP];

    data->tickbase = g_ctx.local()->m_nTickBase();
    data->m_aimPunchAngle = g_ctx.local()->m_aimPunchAngle();
    data->m_aimPunchAngleVel = g_ctx.local()->m_aimPunchAngleVel();
    data->m_viewPunchAngle = g_ctx.local()->m_viewPunchAngle();
    data->m_vecViewOffset = g_ctx.local()->m_vecViewOffset();
    data->m_duckAmount = g_ctx.local()->m_flDuckAmount();
    data->m_duckSpeed = g_ctx.local()->m_flDuckSpeed();
}

void engineprediction::restore_netvars()
{
    auto data = &netvars_data[(m_clientstate()->iCommandAck - 1) % MULTIPLAYER_BACKUP];

    if (data->tickbase != g_ctx.local()->m_nTickBase())
        return;
    int repredict = 0;
    auto aim_punch_angle_delta = g_ctx.local()->m_aimPunchAngle() - data->m_aimPunchAngle;
    auto aim_punch_angle_vel_delta = g_ctx.local()->m_aimPunchAngleVel() - data->m_aimPunchAngleVel;
    auto view_punch_angle_delta = g_ctx.local()->m_viewPunchAngle() - data->m_viewPunchAngle;
    auto view_offset_delta = g_ctx.local()->m_vecViewOffset() - data->m_vecViewOffset;
    auto duck_amount = g_ctx.local()->m_flDuckAmount() - data->m_duckAmount;

    if (fabs(aim_punch_angle_delta.x) > 0.03125f && fabs(aim_punch_angle_delta.y) > 0.03125f && fabs(aim_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngle() = data->m_aimPunchAngle;

    if (fabs(aim_punch_angle_vel_delta.x) > 0.03125f && fabs(aim_punch_angle_vel_delta.y) > 0.03125f && fabs(aim_punch_angle_vel_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngleVel() = data->m_aimPunchAngleVel;

    if (fabs(view_punch_angle_delta.x) > 0.03125f && fabs(view_punch_angle_delta.y) > 0.03125f && fabs(view_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_viewPunchAngle() = data->m_viewPunchAngle;

    if (fabs(view_offset_delta.x) > 0.03125f && fabs(view_offset_delta.y) > 0.03125f && fabs(view_offset_delta.z) > 0.03125f)
        g_ctx.local()->m_vecViewOffset() = data->m_vecViewOffset;

    if (fabs(duck_amount) > 0.03125f)
    {
        g_ctx.local()->m_flDuckAmount() = data->m_duckAmount;
        g_ctx.local()->m_flDuckSpeed() = data->m_duckSpeed;
    }

}

       
   


void engineprediction::setup()
{
    if (prediction_data.prediction_stage != SETUP)
        return;

    backup_data.flags = g_ctx.local()->m_fFlags();
    backup_data.velocity = g_ctx.local()->m_vecVelocity();

    prediction_data.old_curtime = m_globals()->m_curtime;
    prediction_data.old_frametime = m_globals()->m_frametime;

    m_globals()->m_curtime = TICKS_TO_TIME(g_ctx.globals.fixed_tickbase);
    m_globals()->m_frametime = m_prediction()->EnginePaused ? 0.f : m_globals()->m_intervalpertick;

    prediction_data.prediction_stage = PREDICT;
}

void engineprediction::predict(CUserCmd* m_pcmd)
{
    if (prediction_data.prediction_stage != PREDICT)
        return;

    const auto backup_footsteps = m_cvar()->FindVar(crypt_str("sv_footsteps"))->GetInt();

    if (m_clientstate()->iDeltaTick > 0)
        m_prediction()->Update(m_clientstate()->iDeltaTick, true, m_clientstate()->nLastCommandAck, m_clientstate()->nLastOutgoingCommand + m_clientstate()->iChokedCommands);

    if (!prediction_data.prediction_random_seed)
        prediction_data.prediction_random_seed = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("A3 ? ? ? ? 66 0F 6E 86")) + 0x1);

    *prediction_data.prediction_random_seed = MD5_PseudoRandom(m_pcmd->m_command_number) & INT_MAX;

    if (!prediction_data.prediction_player)
        prediction_data.prediction_player = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("89 35 ? ? ? ? F3 0F 10 48")) + 0x2);
    if (!prediction_data.prediction_player)

    *prediction_data.prediction_player = reinterpret_cast <int> (g_ctx.local());

    m_movehelper()->set_host(g_ctx.local());
    m_gamemovement()->StartTrackPredictionErrors(g_ctx.local()); //-V807

    static auto m_nImpulse = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nImpulse"));
    static auto m_nButtons = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nButtons"));
    static auto m_afButtonLast = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonLast"));
    static auto m_afButtonPressed = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonPressed"));
    static auto m_afButtonReleased = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonReleased"));

    if (m_pcmd->m_impulse)
        *reinterpret_cast<uint32_t*>(uint32_t(g_ctx.local()) + m_nImpulse) = m_pcmd->m_impulse;

    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;

    CMoveData move_data;
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
    memset(&move_data, 0, sizeof(CMoveData));

    m_prediction()->SetupMove(g_ctx.local(), m_pcmd, m_movehelper(), &move_data);
    m_gamemovement()->ProcessMovement(g_ctx.local(), &move_data);
    m_prediction()->FinishMove(g_ctx.local(), m_pcmd, &move_data);

    m_gamemovement()->FinishTrackPredictionErrors(g_ctx.local());
    m_movehelper()->set_host(nullptr);

    auto viewmodel = g_ctx.local()->m_hViewModel().Get();

    if (viewmodel)
    {
        viewmodel_data.weapon = viewmodel->m_hWeapon().Get();

        viewmodel_data.viewmodel_index = viewmodel->m_nViewModelIndex();
        viewmodel_data.sequence = viewmodel->m_nSequence();
        viewmodel_data.animation_parity = viewmodel->m_nAnimationParity();

        viewmodel_data.cycle = viewmodel->m_flCycle();
        viewmodel_data.animation_time = viewmodel->m_flAnimTime();
    }
    prediction_data.prediction_stage = FINISH;
}

void engineprediction::finish()
{
    if (prediction_data.prediction_stage != FINISH)
        return;

    *prediction_data.prediction_random_seed = -1;
    *prediction_data.prediction_player = 0;

    m_globals()->m_curtime = prediction_data.old_curtime;
    m_globals()->m_frametime = prediction_data.old_frametime;
}
Это неверлуза ало
 
самарский помойный аукцион
Эксперт
Статус
Оффлайн
Регистрация
30 Июн 2019
Сообщения
1,247
Реакции[?]
578
Поинты[?]
44K
хуя пердикшн вантапа ну спасибо
 
Astty
Пользователь
Статус
Оффлайн
Регистрация
11 Окт 2020
Сообщения
435
Реакции[?]
56
Поинты[?]
0
братан, спасибо(( Я теперь как в вт могу с дт + автопик играть, ура, найс предиктс
дак не знают как в лв 16 тиков поставить (большинство)
легко найти дт, и там поставить 16 цифру и всио
х
Код:
#include "prediction_system.h"

void engineprediction::store_netvars()
{
    auto data = &netvars_data[m_clientstate()->iCommandAck % MULTIPLAYER_BACKUP];

    data->tickbase = g_ctx.local()->m_nTickBase();
    data->m_aimPunchAngle = g_ctx.local()->m_aimPunchAngle();
    data->m_aimPunchAngleVel = g_ctx.local()->m_aimPunchAngleVel();
    data->m_viewPunchAngle = g_ctx.local()->m_viewPunchAngle();
    data->m_vecViewOffset = g_ctx.local()->m_vecViewOffset();
    data->m_duckAmount = g_ctx.local()->m_flDuckAmount();
    data->m_duckSpeed = g_ctx.local()->m_flDuckSpeed();
}

void engineprediction::restore_netvars()
{
    auto data = &netvars_data[(m_clientstate()->iCommandAck - 1) % MULTIPLAYER_BACKUP];

    if (data->tickbase != g_ctx.local()->m_nTickBase())
        return;
    int repredict = 0;
    auto aim_punch_angle_delta = g_ctx.local()->m_aimPunchAngle() - data->m_aimPunchAngle;
    auto aim_punch_angle_vel_delta = g_ctx.local()->m_aimPunchAngleVel() - data->m_aimPunchAngleVel;
    auto view_punch_angle_delta = g_ctx.local()->m_viewPunchAngle() - data->m_viewPunchAngle;
    auto view_offset_delta = g_ctx.local()->m_vecViewOffset() - data->m_vecViewOffset;
    auto duck_amount = g_ctx.local()->m_flDuckAmount() - data->m_duckAmount;

    if (fabs(aim_punch_angle_delta.x) > 0.03125f && fabs(aim_punch_angle_delta.y) > 0.03125f && fabs(aim_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngle() = data->m_aimPunchAngle;

    if (fabs(aim_punch_angle_vel_delta.x) > 0.03125f && fabs(aim_punch_angle_vel_delta.y) > 0.03125f && fabs(aim_punch_angle_vel_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngleVel() = data->m_aimPunchAngleVel;

    if (fabs(view_punch_angle_delta.x) > 0.03125f && fabs(view_punch_angle_delta.y) > 0.03125f && fabs(view_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_viewPunchAngle() = data->m_viewPunchAngle;

    if (fabs(view_offset_delta.x) > 0.03125f && fabs(view_offset_delta.y) > 0.03125f && fabs(view_offset_delta.z) > 0.03125f)
        g_ctx.local()->m_vecViewOffset() = data->m_vecViewOffset;

    if (fabs(duck_amount) > 0.03125f)
    {
        g_ctx.local()->m_flDuckAmount() = data->m_duckAmount;
        g_ctx.local()->m_flDuckSpeed() = data->m_duckSpeed;
    }

}

       
   


void engineprediction::setup()
{
    if (prediction_data.prediction_stage != SETUP)
        return;

    backup_data.flags = g_ctx.local()->m_fFlags();
    backup_data.velocity = g_ctx.local()->m_vecVelocity();

    prediction_data.old_curtime = m_globals()->m_curtime;
    prediction_data.old_frametime = m_globals()->m_frametime;

    m_globals()->m_curtime = TICKS_TO_TIME(g_ctx.globals.fixed_tickbase);
    m_globals()->m_frametime = m_prediction()->EnginePaused ? 0.f : m_globals()->m_intervalpertick;

    prediction_data.prediction_stage = PREDICT;
}

void engineprediction::predict(CUserCmd* m_pcmd)
{
    if (prediction_data.prediction_stage != PREDICT)
        return;

    const auto backup_footsteps = m_cvar()->FindVar(crypt_str("sv_footsteps"))->GetInt();

    if (m_clientstate()->iDeltaTick > 0)
        m_prediction()->Update(m_clientstate()->iDeltaTick, true, m_clientstate()->nLastCommandAck, m_clientstate()->nLastOutgoingCommand + m_clientstate()->iChokedCommands);

    if (!prediction_data.prediction_random_seed)
        prediction_data.prediction_random_seed = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("A3 ? ? ? ? 66 0F 6E 86")) + 0x1);

    *prediction_data.prediction_random_seed = MD5_PseudoRandom(m_pcmd->m_command_number) & INT_MAX;

    if (!prediction_data.prediction_player)
        prediction_data.prediction_player = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("89 35 ? ? ? ? F3 0F 10 48")) + 0x2);
    if (!prediction_data.prediction_player)

    *prediction_data.prediction_player = reinterpret_cast <int> (g_ctx.local());

    m_movehelper()->set_host(g_ctx.local());
    m_gamemovement()->StartTrackPredictionErrors(g_ctx.local()); //-V807

    static auto m_nImpulse = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nImpulse"));
    static auto m_nButtons = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nButtons"));
    static auto m_afButtonLast = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonLast"));
    static auto m_afButtonPressed = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonPressed"));
    static auto m_afButtonReleased = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonReleased"));

    if (m_pcmd->m_impulse)
        *reinterpret_cast<uint32_t*>(uint32_t(g_ctx.local()) + m_nImpulse) = m_pcmd->m_impulse;

    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;

    CMoveData move_data;
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
    memset(&move_data, 0, sizeof(CMoveData));

    m_prediction()->SetupMove(g_ctx.local(), m_pcmd, m_movehelper(), &move_data);
    m_gamemovement()->ProcessMovement(g_ctx.local(), &move_data);
    m_prediction()->FinishMove(g_ctx.local(), m_pcmd, &move_data);

    m_gamemovement()->FinishTrackPredictionErrors(g_ctx.local());
    m_movehelper()->set_host(nullptr);

    auto viewmodel = g_ctx.local()->m_hViewModel().Get();

    if (viewmodel)
    {
        viewmodel_data.weapon = viewmodel->m_hWeapon().Get();

        viewmodel_data.viewmodel_index = viewmodel->m_nViewModelIndex();
        viewmodel_data.sequence = viewmodel->m_nSequence();
        viewmodel_data.animation_parity = viewmodel->m_nAnimationParity();

        viewmodel_data.cycle = viewmodel->m_flCycle();
        viewmodel_data.animation_time = viewmodel->m_flAnimTime();
    }
    prediction_data.prediction_stage = FINISH;
}

void engineprediction::finish()
{
    if (prediction_data.prediction_stage != FINISH)
        return;

    *prediction_data.prediction_random_seed = -1;
    *prediction_data.prediction_player = 0;

    m_globals()->m_curtime = prediction_data.old_curtime;
    m_globals()->m_frametime = prediction_data.old_frametime;
}
Херня, не стреляет иногда
 
шатап книга
Забаненный
Статус
Оффлайн
Регистрация
7 Мар 2020
Сообщения
485
Реакции[?]
119
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
trash code no more
 
Забаненный
Статус
Оффлайн
Регистрация
28 Мар 2021
Сообщения
21
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
#include "prediction_system.h"

void engineprediction::store_netvars()
{
    auto data = &netvars_data[m_clientstate()->iCommandAck % MULTIPLAYER_BACKUP];

    data->tickbase = g_ctx.local()->m_nTickBase();
    data->m_aimPunchAngle = g_ctx.local()->m_aimPunchAngle();
    data->m_aimPunchAngleVel = g_ctx.local()->m_aimPunchAngleVel();
    data->m_viewPunchAngle = g_ctx.local()->m_viewPunchAngle();
    data->m_vecViewOffset = g_ctx.local()->m_vecViewOffset();
    data->m_duckAmount = g_ctx.local()->m_flDuckAmount();
    data->m_duckSpeed = g_ctx.local()->m_flDuckSpeed();
}

void engineprediction::restore_netvars()
{
    auto data = &netvars_data[(m_clientstate()->iCommandAck - 1) % MULTIPLAYER_BACKUP];

    if (data->tickbase != g_ctx.local()->m_nTickBase())
        return;
    int repredict = 0;
    auto aim_punch_angle_delta = g_ctx.local()->m_aimPunchAngle() - data->m_aimPunchAngle;
    auto aim_punch_angle_vel_delta = g_ctx.local()->m_aimPunchAngleVel() - data->m_aimPunchAngleVel;
    auto view_punch_angle_delta = g_ctx.local()->m_viewPunchAngle() - data->m_viewPunchAngle;
    auto view_offset_delta = g_ctx.local()->m_vecViewOffset() - data->m_vecViewOffset;
    auto duck_amount = g_ctx.local()->m_flDuckAmount() - data->m_duckAmount;

    if (fabs(aim_punch_angle_delta.x) > 0.03125f && fabs(aim_punch_angle_delta.y) > 0.03125f && fabs(aim_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngle() = data->m_aimPunchAngle;

    if (fabs(aim_punch_angle_vel_delta.x) > 0.03125f && fabs(aim_punch_angle_vel_delta.y) > 0.03125f && fabs(aim_punch_angle_vel_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngleVel() = data->m_aimPunchAngleVel;

    if (fabs(view_punch_angle_delta.x) > 0.03125f && fabs(view_punch_angle_delta.y) > 0.03125f && fabs(view_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_viewPunchAngle() = data->m_viewPunchAngle;

    if (fabs(view_offset_delta.x) > 0.03125f && fabs(view_offset_delta.y) > 0.03125f && fabs(view_offset_delta.z) > 0.03125f)
        g_ctx.local()->m_vecViewOffset() = data->m_vecViewOffset;

    if (fabs(duck_amount) > 0.03125f)
    {
        g_ctx.local()->m_flDuckAmount() = data->m_duckAmount;
        g_ctx.local()->m_flDuckSpeed() = data->m_duckSpeed;
    }

}

       
   


void engineprediction::setup()
{
    if (prediction_data.prediction_stage != SETUP)
        return;

    backup_data.flags = g_ctx.local()->m_fFlags();
    backup_data.velocity = g_ctx.local()->m_vecVelocity();

    prediction_data.old_curtime = m_globals()->m_curtime;
    prediction_data.old_frametime = m_globals()->m_frametime;

    m_globals()->m_curtime = TICKS_TO_TIME(g_ctx.globals.fixed_tickbase);
    m_globals()->m_frametime = m_prediction()->EnginePaused ? 0.f : m_globals()->m_intervalpertick;

    prediction_data.prediction_stage = PREDICT;
}

void engineprediction::predict(CUserCmd* m_pcmd)
{
    if (prediction_data.prediction_stage != PREDICT)
        return;

    const auto backup_footsteps = m_cvar()->FindVar(crypt_str("sv_footsteps"))->GetInt();

    if (m_clientstate()->iDeltaTick > 0)
        m_prediction()->Update(m_clientstate()->iDeltaTick, true, m_clientstate()->nLastCommandAck, m_clientstate()->nLastOutgoingCommand + m_clientstate()->iChokedCommands);

    if (!prediction_data.prediction_random_seed)
        prediction_data.prediction_random_seed = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("A3 ? ? ? ? 66 0F 6E 86")) + 0x1);

    *prediction_data.prediction_random_seed = MD5_PseudoRandom(m_pcmd->m_command_number) & INT_MAX;

    if (!prediction_data.prediction_player)
        prediction_data.prediction_player = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("89 35 ? ? ? ? F3 0F 10 48")) + 0x2);
    if (!prediction_data.prediction_player)

    *prediction_data.prediction_player = reinterpret_cast <int> (g_ctx.local());

    m_movehelper()->set_host(g_ctx.local());
    m_gamemovement()->StartTrackPredictionErrors(g_ctx.local()); //-V807

    static auto m_nImpulse = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nImpulse"));
    static auto m_nButtons = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nButtons"));
    static auto m_afButtonLast = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonLast"));
    static auto m_afButtonPressed = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonPressed"));
    static auto m_afButtonReleased = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonReleased"));

    if (m_pcmd->m_impulse)
        *reinterpret_cast<uint32_t*>(uint32_t(g_ctx.local()) + m_nImpulse) = m_pcmd->m_impulse;

    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;

    CMoveData move_data;
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
    memset(&move_data, 0, sizeof(CMoveData));

    m_prediction()->SetupMove(g_ctx.local(), m_pcmd, m_movehelper(), &move_data);
    m_gamemovement()->ProcessMovement(g_ctx.local(), &move_data);
    m_prediction()->FinishMove(g_ctx.local(), m_pcmd, &move_data);

    m_gamemovement()->FinishTrackPredictionErrors(g_ctx.local());
    m_movehelper()->set_host(nullptr);

    auto viewmodel = g_ctx.local()->m_hViewModel().Get();

    if (viewmodel)
    {
        viewmodel_data.weapon = viewmodel->m_hWeapon().Get();

        viewmodel_data.viewmodel_index = viewmodel->m_nViewModelIndex();
        viewmodel_data.sequence = viewmodel->m_nSequence();
        viewmodel_data.animation_parity = viewmodel->m_nAnimationParity();

        viewmodel_data.cycle = viewmodel->m_flCycle();
        viewmodel_data.animation_time = viewmodel->m_flAnimTime();
    }
    prediction_data.prediction_stage = FINISH;
}

void engineprediction::finish()
{
    if (prediction_data.prediction_stage != FINISH)
        return;

    *prediction_data.prediction_random_seed = -1;
    *prediction_data.prediction_player = 0;

    m_globals()->m_curtime = prediction_data.old_curtime;
    m_globals()->m_frametime = prediction_data.old_frametime;
}
C++:
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
тебе это нахуй не надо.


C++:
    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;
это тоже
вывод: - trash.
 
Разработчик
Статус
Оффлайн
Регистрация
1 Сен 2018
Сообщения
1,596
Реакции[?]
879
Поинты[?]
113K
C++:
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
тебе это нахуй не надо.


C++:
    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;
это тоже
вывод: - trash.
он сюда сразу мувмент фикс засунул 0_0
 
Пользователь
Статус
Оффлайн
Регистрация
12 Июн 2020
Сообщения
465
Реакции[?]
102
Поинты[?]
3K
C++:
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
тебе это нахуй не надо.


C++:
    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;
это тоже
вывод: - trash.
для того чтоб было
 
Забаненный
Статус
Оффлайн
Регистрация
30 Мар 2021
Сообщения
3
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
найс код с придикта лолихука
 
Пользователь
Статус
Оффлайн
Регистрация
7 Фев 2020
Сообщения
76
Реакции[?]
33
Поинты[?]
0
C++:
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
тебе это нахуй не надо.


C++:
    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;
это тоже
вывод: - trash.
такой же вопрос
 
retard
Пользователь
Статус
Оффлайн
Регистрация
13 Мар 2021
Сообщения
366
Реакции[?]
67
Поинты[?]
10K
Код:
#include "prediction_system.h"

void engineprediction::store_netvars()
{
    auto data = &netvars_data[m_clientstate()->iCommandAck % MULTIPLAYER_BACKUP];

    data->tickbase = g_ctx.local()->m_nTickBase();
    data->m_aimPunchAngle = g_ctx.local()->m_aimPunchAngle();
    data->m_aimPunchAngleVel = g_ctx.local()->m_aimPunchAngleVel();
    data->m_viewPunchAngle = g_ctx.local()->m_viewPunchAngle();
    data->m_vecViewOffset = g_ctx.local()->m_vecViewOffset();
    data->m_duckAmount = g_ctx.local()->m_flDuckAmount();
    data->m_duckSpeed = g_ctx.local()->m_flDuckSpeed();
}

void engineprediction::restore_netvars()
{
    auto data = &netvars_data[(m_clientstate()->iCommandAck - 1) % MULTIPLAYER_BACKUP];

    if (data->tickbase != g_ctx.local()->m_nTickBase())
        return;
    int repredict = 0;
    auto aim_punch_angle_delta = g_ctx.local()->m_aimPunchAngle() - data->m_aimPunchAngle;
    auto aim_punch_angle_vel_delta = g_ctx.local()->m_aimPunchAngleVel() - data->m_aimPunchAngleVel;
    auto view_punch_angle_delta = g_ctx.local()->m_viewPunchAngle() - data->m_viewPunchAngle;
    auto view_offset_delta = g_ctx.local()->m_vecViewOffset() - data->m_vecViewOffset;
    auto duck_amount = g_ctx.local()->m_flDuckAmount() - data->m_duckAmount;

    if (fabs(aim_punch_angle_delta.x) > 0.03125f && fabs(aim_punch_angle_delta.y) > 0.03125f && fabs(aim_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngle() = data->m_aimPunchAngle;

    if (fabs(aim_punch_angle_vel_delta.x) > 0.03125f && fabs(aim_punch_angle_vel_delta.y) > 0.03125f && fabs(aim_punch_angle_vel_delta.z) > 0.03125f)
        g_ctx.local()->m_aimPunchAngleVel() = data->m_aimPunchAngleVel;

    if (fabs(view_punch_angle_delta.x) > 0.03125f && fabs(view_punch_angle_delta.y) > 0.03125f && fabs(view_punch_angle_delta.z) > 0.03125f)
        g_ctx.local()->m_viewPunchAngle() = data->m_viewPunchAngle;

    if (fabs(view_offset_delta.x) > 0.03125f && fabs(view_offset_delta.y) > 0.03125f && fabs(view_offset_delta.z) > 0.03125f)
        g_ctx.local()->m_vecViewOffset() = data->m_vecViewOffset;

    if (fabs(duck_amount) > 0.03125f)
    {
        g_ctx.local()->m_flDuckAmount() = data->m_duckAmount;
        g_ctx.local()->m_flDuckSpeed() = data->m_duckSpeed;
    }

}

       
   


void engineprediction::setup()
{
    if (prediction_data.prediction_stage != SETUP)
        return;

    backup_data.flags = g_ctx.local()->m_fFlags();
    backup_data.velocity = g_ctx.local()->m_vecVelocity();

    prediction_data.old_curtime = m_globals()->m_curtime;
    prediction_data.old_frametime = m_globals()->m_frametime;

    m_globals()->m_curtime = TICKS_TO_TIME(g_ctx.globals.fixed_tickbase);
    m_globals()->m_frametime = m_prediction()->EnginePaused ? 0.f : m_globals()->m_intervalpertick;

    prediction_data.prediction_stage = PREDICT;
}

void engineprediction::predict(CUserCmd* m_pcmd)
{
    if (prediction_data.prediction_stage != PREDICT)
        return;

    const auto backup_footsteps = m_cvar()->FindVar(crypt_str("sv_footsteps"))->GetInt();

    if (m_clientstate()->iDeltaTick > 0)
        m_prediction()->Update(m_clientstate()->iDeltaTick, true, m_clientstate()->nLastCommandAck, m_clientstate()->nLastOutgoingCommand + m_clientstate()->iChokedCommands);

    if (!prediction_data.prediction_random_seed)
        prediction_data.prediction_random_seed = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("A3 ? ? ? ? 66 0F 6E 86")) + 0x1);

    *prediction_data.prediction_random_seed = MD5_PseudoRandom(m_pcmd->m_command_number) & INT_MAX;

    if (!prediction_data.prediction_player)
        prediction_data.prediction_player = *reinterpret_cast <int**> (util::FindSignature(crypt_str("client.dll"), crypt_str("89 35 ? ? ? ? F3 0F 10 48")) + 0x2);
    if (!prediction_data.prediction_player)

    *prediction_data.prediction_player = reinterpret_cast <int> (g_ctx.local());

    m_movehelper()->set_host(g_ctx.local());
    m_gamemovement()->StartTrackPredictionErrors(g_ctx.local()); //-V807

    static auto m_nImpulse = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nImpulse"));
    static auto m_nButtons = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_nButtons"));
    static auto m_afButtonLast = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonLast"));
    static auto m_afButtonPressed = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonPressed"));
    static auto m_afButtonReleased = util::find_in_datamap(g_ctx.local()->GetPredDescMap(), crypt_str("m_afButtonReleased"));

    if (m_pcmd->m_impulse)
        *reinterpret_cast<uint32_t*>(uint32_t(g_ctx.local()) + m_nImpulse) = m_pcmd->m_impulse;

    int* buttons = reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons);
    const int buttonsChanged = m_pcmd->m_buttons ^ *buttons;

    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonLast) = *buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_nButtons) = m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonPressed) = buttonsChanged & m_pcmd->m_buttons;
    *reinterpret_cast<int*>(uint32_t(g_ctx.local()) + m_afButtonReleased) = buttonsChanged & ~m_pcmd->m_buttons;

    CMoveData move_data;
    move_data.m_flForwardMove = m_pcmd->m_forwardmove;
    move_data.m_flSideMove = m_pcmd->m_sidemove;
    move_data.m_flUpMove = m_pcmd->m_upmove;
    move_data.m_nButtons = m_pcmd->m_buttons;
    move_data.m_vecViewAngles = m_pcmd->m_viewangles;
    move_data.m_vecAngles = m_pcmd->m_viewangles;
    move_data.m_nImpulseCommand = m_pcmd->m_impulse;
    memset(&move_data, 0, sizeof(CMoveData));

    m_prediction()->SetupMove(g_ctx.local(), m_pcmd, m_movehelper(), &move_data);
    m_gamemovement()->ProcessMovement(g_ctx.local(), &move_data);
    m_prediction()->FinishMove(g_ctx.local(), m_pcmd, &move_data);

    m_gamemovement()->FinishTrackPredictionErrors(g_ctx.local());
    m_movehelper()->set_host(nullptr);

    auto viewmodel = g_ctx.local()->m_hViewModel().Get();

    if (viewmodel)
    {
        viewmodel_data.weapon = viewmodel->m_hWeapon().Get();

        viewmodel_data.viewmodel_index = viewmodel->m_nViewModelIndex();
        viewmodel_data.sequence = viewmodel->m_nSequence();
        viewmodel_data.animation_parity = viewmodel->m_nAnimationParity();

        viewmodel_data.cycle = viewmodel->m_flCycle();
        viewmodel_data.animation_time = viewmodel->m_flAnimTime();
    }
    prediction_data.prediction_stage = FINISH;
}

void engineprediction::finish()
{
    if (prediction_data.prediction_stage != FINISH)
        return;

    *prediction_data.prediction_random_seed = -1;
    *prediction_data.prediction_player = 0;

    m_globals()->m_curtime = prediction_data.old_curtime;
    m_globals()->m_frametime = prediction_data.old_frametime;
}
send prediction_system.h thankls
 
Сверху Снизу