From e66b0cbf39bb1f96d0980559f9dec5b115e21df1 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Sat, 26 Mar 2011 13:42:41 +0700 Subject: [PATCH] [warps] judgement fix + iStepSearchRows is now seconds-based. + GetClosestNonEmptyRowDirectional and GetClosestNoteDirectional no longer return row in warps. --- src/Player.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Player.cpp b/src/Player.cpp index 8f727a35d7..102652e074 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -1520,6 +1520,8 @@ int Player::GetClosestNoteDirectional( int col, int iStartRow, int iEndRow, bool // Is this the row we want? do { const TapNote &tn = begin->second; + if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( begin->first ) ) + break; if( tn.type == TapNote::empty ) break; if( !bAllowGraded && tn.result.tns != TNS_None ) @@ -1569,6 +1571,11 @@ int Player::GetClosestNonEmptyRowDirectional( int iStartRow, int iEndRow, bool b ++iter; continue; } + if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( iter.Row() ) ) + { + ++iter; + continue; + } return iter.Row(); } } @@ -1966,7 +1973,7 @@ 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( StepSearchDistance * GAMESTATE->m_fCurBPS * GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate ); + const int iStepSearchRows = BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow; int iRowOfOverlappingNoteOrRow = row; if( row == -1 ) {