Checking for first second now ignores autokeysounds.
This commit is contained in:
+10
-2
@@ -422,7 +422,7 @@ int NoteData::GetFirstRow() const
|
||||
for( int t=0; t < GetNumTracks(); t++ )
|
||||
{
|
||||
int iRow = -1;
|
||||
if( !GetNextTapNoteRowForTrack( t, iRow ) )
|
||||
if( !GetNextTapNoteRowForTrack( t, iRow, true ) )
|
||||
continue;
|
||||
|
||||
if( iEarliestRowFoundSoFar == -1 )
|
||||
@@ -972,7 +972,7 @@ int NoteData::GetNumTracksHeldAtRow( int row )
|
||||
return viTracks.size();
|
||||
}
|
||||
|
||||
bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const
|
||||
bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut, bool ignoreAutoKeysounds ) const
|
||||
{
|
||||
const TrackMap &mapTrack = m_TapNotes[track];
|
||||
|
||||
@@ -987,6 +987,14 @@ bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const
|
||||
return false;
|
||||
|
||||
ASSERT( iter->first > rowInOut );
|
||||
|
||||
// If we want to ignore autokeysounds, keep going until we find a real note.
|
||||
if(ignoreAutoKeysounds) {
|
||||
while(iter->second.type == TapNoteType_AutoKeysound) {
|
||||
iter++;
|
||||
if(iter==mapTrack.end()) return false;
|
||||
}
|
||||
}
|
||||
rowInOut = iter->first;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user