[warps] judgement fix

+ iStepSearchRows is now seconds-based.
+ GetClosestNonEmptyRowDirectional and GetClosestNoteDirectional no longer return row in warps.
This commit is contained in:
Thai Pangsakulyanont
2011-03-26 13:42:41 +07:00
parent 784dcb5f60
commit e66b0cbf39
+8 -1
View File
@@ -1520,6 +1520,8 @@ int Player::GetClosestNoteDirectional( int col, int iStartRow, int iEndRow, bool
// Is this the row we want? // Is this the row we want?
do { do {
const TapNote &tn = begin->second; const TapNote &tn = begin->second;
if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( begin->first ) )
break;
if( tn.type == TapNote::empty ) if( tn.type == TapNote::empty )
break; break;
if( !bAllowGraded && tn.result.tns != TNS_None ) if( !bAllowGraded && tn.result.tns != TNS_None )
@@ -1569,6 +1571,11 @@ int Player::GetClosestNonEmptyRowDirectional( int iStartRow, int iEndRow, bool b
++iter; ++iter;
continue; continue;
} }
if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( iter.Row() ) )
{
++iter;
continue;
}
return iter.Row(); 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 * Either option would fundamentally change the grading of two quick notes
* "jack hammers." Hmm. * "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; int iRowOfOverlappingNoteOrRow = row;
if( row == -1 ) if( row == -1 )
{ {