From 15e19d4885b39ea9b7f98f0cedeb5955ff993d88 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 25 Feb 2004 08:40:03 +0000 Subject: [PATCH] fix AddMines places mines that overlap other taps and hold heads (Disconnected Mobius expert) --- stepmania/src/NoteData.cpp | 13 +++++++++++++ stepmania/src/NoteData.h | 1 + stepmania/src/NoteDataUtil.cpp | 16 ++++++++++++---- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 9159365c4d..3303d94827 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -141,6 +141,19 @@ bool NoteData::IsRowEmpty( int index ) const return true; } +bool NoteData::IsRangeEmpty( int track, int iIndexBegin, int iIndexEnd ) const +{ + ASSERT( track last_row ) continue; - - // Add a mine right after the hold end.h + + // Only place a mines if there's not another step nearby + int iMineRangeBegin = BeatToNoteRow( fMineBeat-0.5f ) + 1; + int iMineRangeEnd = BeatToNoteRow( fMineBeat+0.5f ) - 1; + if( !in.IsRangeEmpty(hn.iTrack, iMineRangeBegin, iMineRangeEnd) ) + continue; + + // Add a mine right after the hold end. in.SetTapNote(hn.iTrack,iMineRow,TAP_MINE); - // Convert all other notes in this row to mines. + // Convert all notes in this row to mines. for( int t=0; t