From 74d7f204794aa5e44ba02d8bf0cd0aef3f582c24 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 16 Oct 2002 00:28:01 +0000 Subject: [PATCH] commented debug function no longer exists fold out a conditional (cosmetic) --- stepmania/src/Sprite.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index e28e9edf8c..24cbbb0932 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -166,29 +166,22 @@ bool Sprite::LoadTexture( CString sTexturePath, bool bForceReload, int iMipMaps, void Sprite::Update( float fDeltaTime ) { - //PrintDebugInfo(); - Actor::Update( fDeltaTime ); // do tweening + if( !m_bIsAnimating ) + return; // update animation - if( m_bIsAnimating ) + m_fSecsIntoState += fDeltaTime; + + if( m_fSecsIntoState > m_fDelay[m_iCurState] ) // it's time to switch frames { - m_fSecsIntoState += fDeltaTime; - - if( m_fSecsIntoState > m_fDelay[m_iCurState] ) // it's time to switch frames - { - // increment frame and reset the counter - m_fSecsIntoState -= m_fDelay[m_iCurState]; // leave the left over time for the next frame - m_iCurState ++; - if( m_iCurState >= m_iNumStates ) - m_iCurState = 0; - } + // increment frame and reset the counter + m_fSecsIntoState -= m_fDelay[m_iCurState]; // leave the left over time for the next frame + m_iCurState ++; + if( m_iCurState >= m_iNumStates ) + m_iCurState = 0; } - - - - }