diff --git a/ChaosMod/Components/EffectDispatchTimer.cpp b/ChaosMod/Components/EffectDispatchTimer.cpp index 37db56d68..f4b77ab08 100644 --- a/ChaosMod/Components/EffectDispatchTimer.cpp +++ b/ChaosMod/Components/EffectDispatchTimer.cpp @@ -10,6 +10,7 @@ EffectDispatchTimer::EffectDispatchTimer(const std::array &timerColor) { m_TimerColor = timerColor; + m_DrawTimerBar = !g_OptionsManager.GetConfigValue({ "DisableTimerBarDraw" }, OPTION_DEFAULT_NO_EFFECT_BAR); m_EffectSpawnTime = g_OptionsManager.GetConfigValue({ "NewEffectSpawnTime" }, OPTION_DEFAULT_EFFECT_SPAWN_TIME); m_DistanceChaosState.EnableDistanceBasedEffectDispatch = g_OptionsManager.GetConfigValue( @@ -174,7 +175,7 @@ void EffectDispatchTimer::ResetFakeTimerPercentage() void EffectDispatchTimer::OnRun() { - if (!m_EnableTimer + if (!m_EnableTimer || !m_DrawTimerBar || (ComponentExists() && (GetComponent()->HideChaosUI || GetComponent()->DisableChaos))) { diff --git a/ChaosMod/Components/EffectDispatchTimer.h b/ChaosMod/Components/EffectDispatchTimer.h index 081e75233..9c19f4cdd 100644 --- a/ChaosMod/Components/EffectDispatchTimer.h +++ b/ChaosMod/Components/EffectDispatchTimer.h @@ -8,6 +8,7 @@ class EffectDispatchTimer : public Component bool m_EnableTimer = true; bool m_PauseTimer = false; bool m_DispatchEffectsOnTimer = true; + bool m_DrawTimerBar = true; std::uint16_t m_EffectSpawnTime = 0; std::array m_TimerColor; float m_TimerPercentage = 0.f; diff --git a/ChaosMod/Components/EffectDispatcher.cpp b/ChaosMod/Components/EffectDispatcher.cpp index 3884938a0..a3b59f507 100644 --- a/ChaosMod/Components/EffectDispatcher.cpp +++ b/ChaosMod/Components/EffectDispatcher.cpp @@ -220,10 +220,9 @@ static void _OnRunEffects(LPVOID data) EffectDispatcher::EffectDispatcher(const std::array &textColor, const std::array &effectTimerColor) : Component() { - m_TextColor = textColor; - m_EffectTimerColor = effectTimerColor; + m_TextColor = textColor; + m_EffectTimerColor = effectTimerColor; - m_DisableDrawTimerBar = g_OptionsManager.GetConfigValue({ "DisableTimerBarDraw" }, OPTION_DEFAULT_NO_EFFECT_BAR); m_DisableDrawEffectTexts = g_OptionsManager.GetConfigValue({ "DisableEffectTextDraw" }, OPTION_DEFAULT_NO_TEXT_DRAW); diff --git a/ChaosMod/Components/EffectDispatcher.h b/ChaosMod/Components/EffectDispatcher.h index 23237ed2d..888ed17d2 100644 --- a/ChaosMod/Components/EffectDispatcher.h +++ b/ChaosMod/Components/EffectDispatcher.h @@ -105,7 +105,6 @@ class EffectDispatcher : public Component std::array m_TextColor; std::array m_EffectTimerColor; - bool m_DisableDrawTimerBar = false; bool m_DisableDrawEffectTexts = false; bool m_EnableNormalEffectDispatch = false; @@ -134,7 +133,6 @@ class EffectDispatcher : public Component void DispatchRandomEffect(DispatchEffectFlags dispatchEffectFlags = DispatchEffectFlag_None, const std::string &suffix = {}); - void UpdateTimer(int deltaTime); void UpdateEffects(int deltaTime); void UpdateMetaEffects(int deltaTime);