From 88b6b8cce66ce6e64423875f95983d196f18b24c Mon Sep 17 00:00:00 2001 From: pongo1231 Date: Sun, 19 Jan 2025 01:06:59 +0000 Subject: [PATCH] ChaosMod/EffectDispatcher: Remove unnecessary variable assignment --- ChaosMod/Components/EffectDispatcher.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ChaosMod/Components/EffectDispatcher.cpp b/ChaosMod/Components/EffectDispatcher.cpp index c8652c88c..1ddc6e953 100644 --- a/ChaosMod/Components/EffectDispatcher.cpp +++ b/ChaosMod/Components/EffectDispatcher.cpp @@ -303,9 +303,8 @@ void EffectDispatcher::UpdateEffects(int deltaTime) float adjustedDeltaTime = deltaTime / 1000.f; - int maxEffects = m_MaxRunningEffects; int activeEffects = 0; - // Reverse order to ensure the first effects are removed if activeEffects > maxEffects + // Reverse order to ensure the first effects are removed if activeEffects > m_MaxRunningEffects for (auto it = SharedState.ActiveEffects.rbegin(); it != SharedState.ActiveEffects.rend();) { auto &activeEffect = *it; @@ -374,7 +373,7 @@ void EffectDispatcher::UpdateEffects(int deltaTime) ? 1.f : std::max(1.f, .5f * (activeEffects - EFFECT_NONTIMED_TIMER_SPEEDUP_MIN_EFFECTS + 3))); - if (activeEffect.Timer <= 0.f || (!activeEffect.IsMeta && activeEffects > maxEffects)) + if (activeEffect.Timer <= 0.f || (!activeEffect.IsMeta && activeEffects > m_MaxRunningEffects)) { if (activeEffect.Timer < -60.f) {