fix misses when skipping songs in the jukebox
This commit is contained in:
@@ -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() );
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user