diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 5552486269..5e323fa929 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -237,7 +237,7 @@ void NoteData::RemoveHoldNote( int iHoldIndex ) m_iNumHoldNotes--; } -bool NoteData::IsThereANoteAtRow( int iRow ) +bool NoteData::IsThereANoteAtRow( int iRow ) const { for( int t=0; tConvert4sToHoldNotes(); bool bHoldCrossesThisMeasure = false; +#if 0 + pOriginal->Convert4sToHoldNotes(); for( int i=0; im_iNumHoldNotes; i++ ) { const HoldNote& hn = pOriginal->m_HoldNotes[i]; + /* Bug here: NoteRowToBeat() may have floating point error, + * so we need to do an epsilon here. But we can do this in + * 4s easier anyway ... */ if( hn.m_fStartBeat < NoteRowToBeat(r) && hn.m_fEndBeat > NoteRowToBeat(r) ) { bHoldCrossesThisMeasure = true; @@ -897,7 +901,19 @@ void NoteData::LoadTransformedSlidingWindow( NoteData* pOriginal, int iNewNumTra } } pOriginal->ConvertHoldNotesTo4s(); - +#endif + + if( r ) + for( int t=0; t<=pOriginal->m_iNumTracks; t++ ) + { + if( pOriginal->m_TapNotes[t][r] == '4' && + pOriginal->m_TapNotes[t][r-1] == '4') + { + bHoldCrossesThisMeasure = true; + break; + } + } + // adjust offset if( !bHoldCrossesThisMeasure ) { diff --git a/stepmania/src/NoteData.h b/stepmania/src/NoteData.h index 85ebfdf158..adc0f7f3d3 100644 --- a/stepmania/src/NoteData.h +++ b/stepmania/src/NoteData.h @@ -56,7 +56,7 @@ public: void RemoveHoldNote( int index ); // statistics - bool IsThereANoteAtRow( int iRow ); + bool IsThereANoteAtRow( int iRow ) const; float GetFirstBeat(); // return the beat number of the first note int GetFirstRow();