38bool KartBoost::calc() {
39 static constexpr std::array<f32, BOOST_TYPE_COUNT> MULTIPLIERS = {{
45 static constexpr std::array<f32, BOOST_TYPE_COUNT> ACCELERATIONS = {{
51 static constexpr std::array<f32, BOOST_TYPE_COUNT> LIMITS = {{
58 m_acceleration = 1.0f;
61 for (
size_t i = 0; i < BOOST_TYPE_COUNT; ++i) {
66 m_multiplier = 1.0f + MULTIPLIERS[i];
67 m_acceleration = ACCELERATIONS[i];
68 m_speedLimit = LIMITS[i];
70 if (--m_timers[i] <= 0) {
75 return m_multiplier > 1.0f || m_speedLimit > 0.0f;