fixed skipping the last frame of animation

This commit is contained in:
Mikulas Florek 2016-12-02 22:40:39 +01:00
parent c135785345
commit 36c7f8e340

View file

@ -64,7 +64,7 @@ void Animation::getRelativePose(float time, Pose& pose, Model& model, float weig
Vec3* pos = pose.positions;
Quat* rot = pose.rotations;
if (frame < m_frame_count - 1)
if (frame < m_frame_count)
{
for (Bone& bone : m_bones)
{
@ -176,7 +176,7 @@ void Animation::getRelativePose(float time, Pose& pose, Model& model) const
Vec3* pos = pose.positions;
Quat* rot = pose.rotations;
if (frame < m_frame_count - 1)
if (frame < m_frame_count)
{
for (Bone& bone : m_bones)
{