From 22e2c8f6254d2f6bfdee5ab50ee8edd85b1154d9 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Thu, 31 Mar 2011 23:31:13 +0700 Subject: [PATCH] fix stops bug on stops longer than 1 seconds, iStepSearchRows is 0. the fix is to look backwards in addition to looking forwards. --- src/Player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Player.cpp b/src/Player.cpp index 13bae07600..92aeee5f09 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -1973,7 +1973,10 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b * Either option would fundamentally change the grading of two quick notes * "jack hammers." Hmm. */ - const int iStepSearchRows = BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow; + const int iStepSearchRows = max( + BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow, + iSongRow - BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds - StepSearchDistance ) ) + ) + ROWS_PER_BEAT; int iRowOfOverlappingNoteOrRow = row; if( row == -1 ) {