Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Local animation fix

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
27 Фев 2020
Сообщения
255
Реакции
25
Всем доброго времени суток, господа не соизволите ли вы предоставить временный аним фикс на локал. Или предоставить несколько тем на uc (no ad),yougame для понятия как его создать или как сделать его как можно лучше. Был бы вам очень признателен.:grinning:
 
Самый обычный фикс локальной анимации
C++:
Expand Collapse Copy
void Animations::UpdateLocalAnimations()
{
    if (!g_cl.m_cmd || !g_cl.m_processing)
        return;

    CCSGOPlayerAnimState* state = g_cl.m_local->m_PlayerAnimState();
    if (!state) {
        return;
    }

    if (!g_csgo.m_cl) {
        return;
    }

    // allow re-animating in the same frame.
    if (state->m_iLastClientSideAnimationUpdateFramecount == g_csgo.m_globals->m_frame) {
        state->m_iLastClientSideAnimationUpdateFramecount -= 1;
    }

    // update anim update delta as server build.
    state->m_flUpdateTimeDelta = math::Max(0.0f, g_csgo.m_globals->m_curtime - state->m_flLastClientSideAnimationUpdateTime); // negative values possible when clocks on client and server go out of sync..

    if (g_cl.m_animate) {
        // get layers.
        g_cl.m_local->GetAnimLayers(g_cl.m_real_layers);

        // allow the game to update animations this tick.
        g_cl.m_update = true;

        // update animations.
        game::UpdateAnimationState(state, g_cl.m_angle);
        g_cl.m_local->UpdateClientSideAnimation();

        // disallow the game from updating animations this tick.
        g_cl.m_update = false;

        // save data when our choke cycle resets.
        if (!g_csgo.m_cl->iChokedCommands) {
            g_cl.m_rotation.y = state->m_flGoalFeetYaw;
            g_cl.m_local->GetPoseParameters(g_cl.m_real_poses);
        }

        // remove model sway.
        g_cl.m_real_layers[12].m_weight = 0.f;

        // make sure to only animate once per tick.
        g_cl.m_animate = false;
    }

    // update our layers and poses with the saved ones.
    g_cl.m_local->SetAnimLayers(g_cl.m_real_layers);
    g_cl.m_local->SetPoseParameters(g_cl.m_real_poses);
    
    // update our real rotation.
    g_cl.m_local->SetAbsAngles(g_cl.m_rotation);

    // build bones.
    setup_bones(g_cl.m_local, g_cl.m_real_matrix, 0x7FF00, g_cl.m_local->m_flSimulationTime());
}
 
Назад
Сверху Снизу