allow a scroll time of 0 for non-scrolling lists

This commit is contained in:
Chris Danford
2005-01-06 01:51:55 +00:00
parent a04d415ac7
commit fddfd2783e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -27,7 +27,6 @@ void ActorScroller::Load(
const RageVector3 &vTranslateTerm2 const RageVector3 &vTranslateTerm2
) )
{ {
ASSERT( fSecondsPerItem > 0 );
m_fSecondsPerItem = fSecondsPerItem; m_fSecondsPerItem = fSecondsPerItem;
m_iNumItemsToDraw = iNumItemsToDraw; m_iNumItemsToDraw = iNumItemsToDraw;
m_vRotationDegrees = vRotationDegrees; m_vRotationDegrees = vRotationDegrees;
@@ -45,7 +44,8 @@ void ActorScroller::Update( float fDeltaTime )
if( m_fHibernateSecondsLeft > 0 ) if( m_fHibernateSecondsLeft > 0 )
return; // early abort return; // early abort
fapproach( m_fCurrentItem, m_fDestinationItem, fDeltaTime/m_fSecondsPerItem ); if( m_fSecondsPerItem > 0 )
fapproach( m_fCurrentItem, m_fDestinationItem, fDeltaTime/m_fSecondsPerItem );
} }
void ActorScroller::DrawPrimitives() void ActorScroller::DrawPrimitives()
+1 -1
View File
@@ -29,7 +29,7 @@ protected:
bool m_bLoaded; bool m_bLoaded;
float m_fCurrentItem; // usually between 0 and m_SubActors.size() float m_fCurrentItem; // usually between 0 and m_SubActors.size()
float m_fDestinationItem; float m_fDestinationItem;
float m_fSecondsPerItem; float m_fSecondsPerItem; // <= 0 means don't scroll
int m_iNumItemsToDraw; int m_iNumItemsToDraw;
// Note: Rotation is applied before translation. // Note: Rotation is applied before translation.