fix misses when skipping songs in the jukebox

This commit is contained in:
Glenn Maynard
2003-02-09 06:08:03 +00:00
parent 98f82654f8
commit c22b8ff1bb
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -728,7 +728,12 @@ void ScreenGameplay::Update( float fDeltaTime )
return;
// update the global music statistics for other classes to access
GAMESTATE->UpdateSongPosition(m_soundMusic.GetPositionSeconds());
/* If ScreenJukebox is changing screens, it'll stop m_soundMusic to tell
* us not to update the time here. (In that case, we've already created
* a new ScreenJukebox and reset music statistics, and if we do this then
* we'll un-reset them.) */
if(m_soundMusic.IsPlaying())
GAMESTATE->UpdateSongPosition(m_soundMusic.GetPositionSeconds());
m_MaxCombo.SetText( ssprintf("%d", m_Player[GAMESTATE->m_MasterPlayerNumber].GetPlayersMaxCombo()) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
+4
View File
@@ -240,6 +240,10 @@ void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM )
m_Fade.CloseWipingRight( SM_GoToNextScreen );
return;
case SM_GoToNextScreen:
/* We're actually under Update(), so make sure ScreenGameplay doesn't
* continue grading for this call. */
m_soundMusic.StopPlaying();
SCREENMAN->SetNewScreen( "ScreenJukebox" );
return;
}