fix remaining songs stats get double-counted after fail in Versus course modes

This commit is contained in:
Chris Danford
2005-04-11 07:59:27 +00:00
parent d7f4346cb7
commit db7796392e
2 changed files with 63 additions and 62 deletions
+7 -6
View File
@@ -775,7 +775,9 @@ bool ScreenGameplay::IsLastSong()
return GAMESTATE->GetCourseSongIndex() >= (int)m_apSongsQueue.size()-1; // GetCourseSongIndex() is 0-based
}
void ScreenGameplay::SetupSong( PlayerNumber p, int iSongIndex )
void ScreenGameplay::SetupSong( int iSongIndex )
{
FOREACH_EnabledPlayer( p )
{
/* This is the first beat that can be changed without it being visible. Until
* we draw for the first time, any beat can be changed. */
@@ -835,6 +837,7 @@ void ScreenGameplay::SetupSong( PlayerNumber p, int iSongIndex )
/* Hack: Course modifiers that are set to start immediately shouldn't tween on. */
GAMESTATE->m_pPlayerState[p]->m_CurrentPlayerOptions = GAMESTATE->m_pPlayerState[p]->m_PlayerOptions;
}
}
void ScreenGameplay::LoadCourseSongNumber( int SongNumber )
{
@@ -878,10 +881,10 @@ void ScreenGameplay::LoadNextSong()
m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetString() );
SetupSong( iPlaySongIndex );
FOREACH_EnabledPlayer( p )
{
SetupSong( p, iPlaySongIndex );
Song* pSong = GAMESTATE->m_pCurSong;
Steps* pSteps = GAMESTATE->m_pCurSteps[p];
STATSMAN->m_CurStageStats.m_player[p].vpSteps.push_back( pSteps );
@@ -2075,14 +2078,12 @@ void ScreenGameplay::StageFinished( bool bBackedOut )
iPlaySongIndex < m_apSongsQueue.size(); ++iPlaySongIndex )
{
LOG->Trace("Running stats for %i", iPlaySongIndex );
SetupSong( iPlaySongIndex );
FOREACH_EnabledPlayer(p)
{
SetupSong( p, iPlaySongIndex );
m_Player[p].ApplyWaitingTransforms();
SongFinished();
}
}
}
// save current stage stats
if( !bBackedOut )
+1 -1
View File
@@ -57,7 +57,7 @@ protected:
void TweenOffScreen();
bool IsLastSong();
void SetupSong( PlayerNumber p, int iSongIndex );
void SetupSong( int iSongIndex );
void LoadNextSong();
void LoadCourseSongNumber( int SongNumber );
float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic);