animationmanager: optimize avar state

This commit is contained in:
vaxerski
2023-07-19 22:40:03 +02:00
parent 80cd2ef3d7
commit 7091d4e597
2 changed files with 13 additions and 14 deletions

View File

@@ -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) {