fix off-by-one (oops)

This commit is contained in:
Glenn Maynard
2003-02-25 21:23:21 +00:00
parent 4241b20f57
commit a441f136de
+2 -1
View File
@@ -210,9 +210,10 @@ RageColor GameState::GetStageColor()
int GameState::GetCourseSongIndex() int GameState::GetCourseSongIndex()
{ {
int iSongIndex = 0; int iSongIndex = 0;
/* iSongsPlayed includes the current song, so it's 1-based; subtract one. */
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
if( IsPlayerEnabled(p) ) if( IsPlayerEnabled(p) )
iSongIndex = max( iSongIndex, m_CurStageStats.iSongsPlayed[p] ); iSongIndex = max( iSongIndex, m_CurStageStats.iSongsPlayed[p]-1 );
return iSongIndex; return iSongIndex;
} }