Fix the blinking characters in the BeginnerHelper.

(why was this return here? we need to set up the first frame after reverting to the default animation.)
remove m_sMostRecentAnimation, as it is not needed at all.
This commit is contained in:
Thad Ward
2003-08-31 11:47:05 +00:00
parent dd2a9d6f07
commit ea458a443d
2 changed files with 1 additions and 9 deletions
+1 -8
View File
@@ -600,7 +600,6 @@ bool Model::LoadMilkshapeAsciiBones( CString sAniName, CString sPath )
}
PlayAnimation( sAniName );
m_sMostRecentAnimation = sAniName;
}
}
@@ -689,9 +688,6 @@ void Model::SetDefaultAnimation( CString sAnimation, float fPlayRate )
{
m_sDefaultAnimation = sAnimation;
m_fDefaultAnimationRate = fPlayRate;
m_sMostRecentAnimation = ""; // Clear this out so if we set a different default
// while the current default is playing, it will
// change to the new one when the current ends.
}
void Model::PlayAnimation( CString sAniName, float fPlayRate )
@@ -704,7 +700,6 @@ void Model::PlayAnimation( CString sAniName, float fPlayRate )
m_fCurrFrame = 0;
m_fCurAnimationRate = fPlayRate;
m_sMostRecentAnimation = sAniName;
if ( m_pCurAnimation == pNewAnimation )
return;
@@ -779,11 +774,9 @@ Model::AdvanceFrame (float dt)
m_fCurrFrame += FRAMES_PER_SECOND * dt * m_fCurAnimationRate;
if (m_fCurrFrame >= (float)m_pCurAnimation->nTotalFrames)
{
if( (m_bRevertToDefaultAnimation) && (m_sDefaultAnimation != "") && (m_sDefaultAnimation != m_sMostRecentAnimation) )
if( (m_bRevertToDefaultAnimation) && (m_sDefaultAnimation != "") )
{
this->PlayAnimation( m_sDefaultAnimation, m_fDefaultAnimationRate );
m_fCurrFrame = 0.0f;
return;
}
else
{
-1
View File
@@ -79,7 +79,6 @@ private:
CString m_sDefaultAnimation;
float m_fDefaultAnimationRate;
float m_fCurAnimationRate;
CString m_sMostRecentAnimation;
};