Гайд Fixed jitter resolver for Airflow V1.5

Начинающий
Статус
Оффлайн
Регистрация
15 Окт 2021
Сообщения
46
Реакции[?]
5
Поинты[?]
2K
resolver.cpp:
 inline void prepare_jitter(c_cs_player* player, resolver_info_t& resolver_info, anim_record_t* current)
    {
        auto& jitter = resolver_info.jitter;

        jitter.yaw_cache[jitter.yaw_cache_offset % YAW_CACHE_SIZE] = current->eye_angles.y;

        if (jitter.yaw_cache_offset >= YAW_CACHE_SIZE)
            jitter.yaw_cache_offset = 0;
        else
            jitter.yaw_cache_offset++;

        float total_yaw_change = 0.f;
        int num_changes = 0;

        for (int i = 0; i < YAW_CACHE_SIZE - 1; ++i)
        {
            float diff = std::fabsf(jitter.yaw_cache[i] - jitter.yaw_cache[i + 1]);
            total_yaw_change += diff;
            if (diff != 0.f) num_changes++;
        }

        float avg_yaw_change = num_changes > 0 ? total_yaw_change / num_changes : 0.f;

        jitter.is_jitter = avg_yaw_change > JITTER_THRESHOLD;
    }
resolver.hpp:
constexpr auto JITTER_THRESHOLD = 10.0f;
 
Начинающий
Статус
Оффлайн
Регистрация
13 Май 2022
Сообщения
100
Реакции[?]
11
Поинты[?]
8K
this does not only do absolutely nothing, it also looks like it was generated with chat-gpt. /del and /del your account with it
 
Сверху Снизу