From d1f939f486634a41e3164619b8f62d8a77345acf Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 8 Jul 2008 00:48:26 +0000 Subject: [PATCH] fix missed checkpoints still counts as full combo --- stepmania/src/Player.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 68ac20c962..e13792ba84 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -1042,6 +1042,8 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector= iMaxEndRow ) { + bool bLetGoOfHoldNote = false; + /* Score rolls that end with fLife == 0 as LetGo, even if HOLD_CHECKPOINTS is on. * Rolls don't have iCheckpointsMissed set, so, unless we check Life == 0, rolls would always be * scored as Held. */ @@ -1057,28 +1059,27 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vectorpTN->HoldResult.iCheckpointsHit; - iCheckpointsMissed &= v->pTN->HoldResult.iCheckpointsMissed; + iCheckpointsHit += v->pTN->HoldResult.iCheckpointsHit; + iCheckpointsMissed += v->pTN->HoldResult.iCheckpointsMissed; } + bLetGoOfHoldNote = iCheckpointsMissed > 0 || iCheckpointsHit == 0; + // TRICKY: If the hold is so short that it has no checkpoints, then mark it as Held if the head was stepped on. if( iCheckpointsHit == 0 && iCheckpointsMissed == 0 ) - bAllowScoreAsHeld = bSteppedOnHead; - else - bAllowScoreAsHeld = iCheckpointsMissed == 0; + bLetGoOfHoldNote = !bSteppedOnHead; } else { - bAllowScoreAsHeld = fLife > 0; + bLetGoOfHoldNote = fLife == 0; } - if( bInitiatedNote && bAllowScoreAsHeld ) + if( bInitiatedNote && !bLetGoOfHoldNote ) { fLife = 1; hns = HNS_Held;