diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 19:26:10 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 19:26:10 +0200 |
| commit | 6c1f4faff2602a6d834d8f641a8a39783bbb9465 (patch) | |
| tree | b7c662026ce9b584baf4a2d1d65d02464dd49d79 /src/managers/AnimationManager.cpp | |
| parent | 7940f779e9dd670157932ce17a872c14747ad490 (diff) | |
animationmgr: avoid looping over all avars in favor of only active ones
Diffstat (limited to 'src/managers/AnimationManager.cpp')
| -rw-r--r-- | src/managers/AnimationManager.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index 0973c759..2f2977c4 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -58,12 +58,7 @@ void CAnimationManager::tick() { std::vector<CAnimatedVariable*> animationEndedVars; - for (auto& av : m_lAnimatedVariables) { - - // first of all, check if we need to update it at all - // TODO: this has a 100% cache miss rate, maybe move active avars to a separate vec - if (!av->m_bIsBeingAnimated) - continue; + for (auto& av : m_vActiveAnimatedVariables) { if (av->m_eDamagePolicy == AVARDAMAGE_SHADOW && !*PSHADOWSENABLED) { av->warp(false); |
