From 3177a3669730089116d4340c24c884c90127dbab Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 4 Apr 2004 04:12:26 +0000 Subject: [PATCH] fix tick not being played on row 0 --- stepmania/src/ScreenEdit.cpp | 4 +++- stepmania/src/ScreenGameplay.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index a1f6406027..facc7da083 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -399,7 +399,9 @@ void ScreenEdit::PlayTicks() const float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds ); const int iSongRow = max( 0, BeatToNoteRowNotRounded( fSongBeat ) ); - static int iRowLastCrossed = 0; + static int iRowLastCrossed = -1; + if( iSongRow < iRowLastCrossed ) + iRowLastCrossed = -1; int iTickRow = -1; for( int r=iRowLastCrossed+1; r<=iSongRow; r++ ) // for each index we crossed since the last update diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 1ce344e6ae..93965c9086 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1088,7 +1088,9 @@ void ScreenGameplay::PlayTicks() const float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds ); const int iSongRow = max( 0, BeatToNoteRowNotRounded( fSongBeat ) ); - static int iRowLastCrossed = 0; + static int iRowLastCrossed = -1; + if( iSongRow < iRowLastCrossed ) + iRowLastCrossed = -1; int iTickRow = -1; for( int r=iRowLastCrossed+1; r<=iSongRow; r++ ) // for each index we crossed since the last update