Fixed MD2 animation

Former-commit-id: 3ba7d63f9518c64677e575e13d8a42b459c5151f
This commit is contained in:
Lynix
2012-12-29 01:37:44 +01:00
parent 15888b0f42
commit 11fccc4c4b
4 changed files with 43 additions and 2 deletions

View File

@@ -424,8 +424,16 @@ void NzModel::Update(float elapsedTime)
unsigned lastFrame = m_currentSequence->firstFrame + m_currentSequence->frameCount - 1;
if (m_nextFrame+1 > lastFrame)
{
m_currentFrame = m_currentSequence->firstFrame;
m_nextFrame = m_currentFrame+1;
if (m_animation->IsLoopPointInterpolationEnabled())
{
m_currentFrame = m_nextFrame;
m_nextFrame = m_currentSequence->firstFrame;
}
else
{
m_currentFrame = m_currentSequence->firstFrame;
m_nextFrame = m_currentFrame+1;
}
}
else
{