From f9c301e248a7b9d72f279a40a6523afbeaa51b07 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 19 Dec 2003 07:50:23 +0000 Subject: [PATCH] fix NoteDataUtil::RemoveHoldNotes --- stepmania/src/NoteDataUtil.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index 8399bdeaa2..41fec4c507 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -359,15 +359,12 @@ void NoteDataUtil::RemoveHoldNotes(NoteData &in, float fStartBeat, float fEndBea // turn all the HoldNotes into TapNotes for( int i=in.GetNumHoldNotes()-1; i>=0; i-- ) // iterate backwards so we can delete { - const HoldNote &hn = in.GetHoldNote(i); - if( !hn.RangeInside( iStartIndex, iEndIndex ) ) + const HoldNote hn = in.GetHoldNote( i ); + if( !hn.RangeOverlaps(iStartIndex,iEndIndex) ) continue; // skip - const int iStartRow = hn.iStartRow; - in.RemoveHoldNote( i ); - - in.SetTapNote(hn.iTrack, iStartRow, TAP_TAP); + in.SetTapNote( hn.iTrack, hn.iStartRow, TAP_TAP ); } }