From 1ac2b23ceed88b50420dd80748116713801c28b1 Mon Sep 17 00:00:00 2001 From: Mike Hawkins Date: Sat, 10 May 2008 22:31:32 +0000 Subject: [PATCH] Fix roll + autoplay bug under specific condition: roll starts on the same row as a freeze (roll would not be updated previously) --- stepmania/src/Player.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index a2e56421f7..c450853924 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -714,7 +714,18 @@ void Player::Update( float fDeltaTime ) // TODO: Make the CPU miss sometimes. int iHeadRow; if( !m_NoteData.IsHoldNoteAtRow(iTrack, iSongRow, &iHeadRow) ) - continue; + { + /* Mike: + * Because IsHoldNoteAtRow() returns false if iSongRow == iHeadRow, double check the + * next row to be absolutely sure that we're not in a roll. + * Necessary in the event that we have a freeze occur on the same row as a roll start, + * otherwise we report that there is no roll in that freeze and thus it doesn't get + * updated. */ + if( !m_NoteData.IsHoldNoteAtRow(iTrack, (iSongRow+1), &iHeadRow) ) + continue; + else + iHeadRow = iSongRow; + } const TapNote &tn = m_NoteData.GetTapNote( iTrack, iHeadRow ); if( tn.type != TapNote::hold_head || tn.subType != TapNote::hold_head_roll )