Merge branch 'master' into textures

This commit is contained in:
Georg Hagen
2024-07-09 13:44:09 +02:00
5 changed files with 12 additions and 8 deletions

View File

@@ -15,9 +15,7 @@ namespace OpenVulkano::Scene
const SequenceAnimationController::PoseDurationPair& SequenceAnimationController::GetStep(int index) const
{
if(index >= 0 && index < m_steps.size())
return m_steps[index];
return PoseDurationPair();
return m_steps[std::max(0, std::min(index, static_cast<int>(m_steps.size() - 1)))];
}
void SequenceAnimationController::SequenceCompletedCallback(SimpleAnimationController *ignored)
@@ -127,4 +125,4 @@ namespace OpenVulkano::Scene
m_animationController.Reset();
}
}
}
}