diff --git a/src/Player.cpp b/src/Player.cpp index da11ff8cdf..194676330c 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -2587,8 +2587,7 @@ void Player::UpdateJudgedRows() int iRow = iter.Row(); // if row is within a warp section, ignore it. -aj - if( iRow >= GAMESTATE->m_iWarpBeginRow && - iRow < BeatToNoteRow(GAMESTATE->m_fWarpDestination) ) + if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow(iRow) ) continue; if( iLastSeenRow != iRow ) diff --git a/src/TimingData.cpp b/src/TimingData.cpp index ea0c30b937..9af8b6d11b 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -343,14 +343,12 @@ int TimingData::GetWarpSegmentIndexAtRow( int iNoteRow ) const bool TimingData::IsWarpAtRow( int iNoteRow ) const { - unsigned i; - for( i=0; i= iNoteRow ) - return iNoteRow < BeatToNoteRow(m_WarpSegments[i].m_fEndBeat); - } - return false; + if( m_WarpSegments.empty() ) + return false; + + int i = GetWarpSegmentIndexAtRow( iNoteRow ); + const WarpSegment& s = m_WarpSegments[i]; + return s.m_iStartRow <= iNoteRow && iNoteRow < BeatToNoteRow(s.m_fEndBeat); } int TimingData::GetTimeSignatureSegmentIndexAtRow( int iRow ) const