mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Fix animations not being restartable (#15016)
This commit is contained in:
parent
2664afd832
commit
dc21924f31
2 changed files with 3 additions and 7 deletions
|
@ -1518,9 +1518,8 @@ void GenericCAO::updateAnimation()
|
|||
if (!m_animated_meshnode)
|
||||
return;
|
||||
|
||||
if (m_animated_meshnode->getStartFrame() != m_animation_range.X ||
|
||||
m_animated_meshnode->getEndFrame() != m_animation_range.Y)
|
||||
m_animated_meshnode->setFrameLoop(m_animation_range.X, m_animation_range.Y);
|
||||
// Note: This sets the current frame as well, (re)starting the animation.
|
||||
m_animated_meshnode->setFrameLoop(m_animation_range.X, m_animation_range.Y);
|
||||
if (m_animated_meshnode->getAnimationSpeed() != m_animation_speed)
|
||||
m_animated_meshnode->setAnimationSpeed(m_animation_speed);
|
||||
m_animated_meshnode->setTransitionTime(m_animation_blend);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue