1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Fix playback of shooter animations at max speed

This commit is contained in:
Ivan Savenko
2023-03-20 17:48:52 +02:00
parent 688b8db3eb
commit 31b718898a
4 changed files with 20 additions and 22 deletions

View File

@@ -711,6 +711,13 @@ void RangedAttackAnimation::nextFrame()
}
bool stackHasProjectile = owner.projectilesController->hasActiveProjectile(stack, true);
if (!projectileEmitted || stackHasProjectile)
stackAnimation(attackingStack)->playUntil(getAttackClimaxFrame());
else
stackAnimation(attackingStack)->playUntil(static_cast<size_t>(-1));
AttackAnimation::nextFrame();
if (!projectileEmitted)