diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index c844733ff2..4a8859f8ae 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -88,6 +88,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi m_pScore = pScore; m_pInventory = pInventory; m_pScoreKeeper = pScoreKeeper; + m_iRowLastCrossed = -1; /* Ensure that this is up-to-date. */ GAMESTATE->m_pPosition->Load(pn); @@ -287,6 +288,14 @@ void Player::Update( float fDeltaTime ) m_sLastSeenNoteSkin = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin; } */ + const int iRowNow = BeatToNoteRow( GAMESTATE->m_fSongBeat ); + if( iRowNow >= 0 ) + { + for( ; m_iRowLastCrossed <= iRowNow; m_iRowLastCrossed++ ) // for each index we crossed since the last update + if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) ) + CrossedRow( m_iRowLastCrossed ); + } + ActorFrame::Update( fDeltaTime ); } @@ -575,6 +584,10 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds ) void Player::CrossedRow( int iNoteRow ) { + // If we're doing random vanish, randomise notes on the fly. + if(GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH]==1) + RandomiseNotes( iNoteRow ); + // check to see if there's at the crossed row for( int t=0; tResetMusicStatistics(); int p; for( p=0; pm_fSongBeat ); - if( iRowNow >= 0 ) - { - for( ; m_iRowLastCrossed <= iRowNow; m_iRowLastCrossed++ ) // for each index we crossed since the last update - for( pn=0; pnIsPlayerEnabled(pn) ) - { - if(GAMESTATE->m_CurrentPlayerOptions[pn].m_fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH]==1) // if we're doing random vanish - { - m_Player[pn].RandomiseNotes( m_iRowLastCrossed ); // randomise notes on the fly - } - m_Player[pn].CrossedRow( m_iRowLastCrossed ); - } - } - if( GAMESTATE->m_SongOptions.m_bAssistTick && IsTimeToPlayTicks()) m_soundAssistTick.Play(); diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index 484351a04a..d58e80c7e6 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -192,7 +192,6 @@ protected: bool m_bZeroDeltaOnNextUpdate; bool m_bDemonstration; - int m_iRowLastCrossed; RageSound m_soundAssistTick; RageSound m_soundMusic;