fix NoteDataUtil::RemoveHoldNotes
This commit is contained in:
@@ -359,15 +359,12 @@ void NoteDataUtil::RemoveHoldNotes(NoteData &in, float fStartBeat, float fEndBea
|
|||||||
// turn all the HoldNotes into TapNotes
|
// turn all the HoldNotes into TapNotes
|
||||||
for( int i=in.GetNumHoldNotes()-1; i>=0; i-- ) // iterate backwards so we can delete
|
for( int i=in.GetNumHoldNotes()-1; i>=0; i-- ) // iterate backwards so we can delete
|
||||||
{
|
{
|
||||||
const HoldNote &hn = in.GetHoldNote(i);
|
const HoldNote hn = in.GetHoldNote( i );
|
||||||
if( !hn.RangeInside( iStartIndex, iEndIndex ) )
|
if( !hn.RangeOverlaps(iStartIndex,iEndIndex) )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
const int iStartRow = hn.iStartRow;
|
|
||||||
|
|
||||||
in.RemoveHoldNote( i );
|
in.RemoveHoldNote( i );
|
||||||
|
in.SetTapNote( hn.iTrack, hn.iStartRow, TAP_TAP );
|
||||||
in.SetTapNote(hn.iTrack, iStartRow, TAP_TAP);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user