Code: Select all
void CAnimatedHuman::setWalkTrack(SAnimation* anim)
{
//Null animation means to just turn it off
if ( anim == 0 )
{
m_walkTrack->setFrameLoop(0,0);
m_currentWalkTrack = 0;
return;
}
//Only update if the animation is different
if ( anim != m_currentWalkTrack )
{
m_walkTrack->setFrameLoop(anim->m_startFrame, anim->m_endFrame);
m_walkTrack->setLoopMode(anim->m_loop);
}
m_currentWalkTrack = anim;
}
Where did I go wrong?