summaryrefslogtreecommitdiff
path: root/src/managers/AnimationManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-19 22:40:03 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-19 22:40:03 +0200
commit7091d4e5979720ddb30f540b2d7da48080bf2487 (patch)
treed30fc8f48a5f166a694bddc627701ea28739f5c7 /src/managers/AnimationManager.cpp
parent80cd2ef3d7b95846314961823a19d5e1015d206a (diff)
animationmanager: optimize avar state
Diffstat (limited to 'src/managers/AnimationManager.cpp')
-rw-r--r--src/managers/AnimationManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp
index fa1e2941..0973c759 100644
--- a/src/managers/AnimationManager.cpp
+++ b/src/managers/AnimationManager.cpp
@@ -61,7 +61,8 @@ void CAnimationManager::tick() {
for (auto& av : m_lAnimatedVariables) {
// first of all, check if we need to update it at all
- if (!av->isBeingAnimated())
+ // TODO: this has a 100% cache miss rate, maybe move active avars to a separate vec
+ if (!av->m_bIsBeingAnimated)
continue;
if (av->m_eDamagePolicy == AVARDAMAGE_SHADOW && !*PSHADOWSENABLED) {