diff --git a/src/ScoreKeeperNormal.cpp b/src/ScoreKeeperNormal.cpp index 4fc6e1ea92..f24c526507 100644 --- a/src/ScoreKeeperNormal.cpp +++ b/src/ScoreKeeperNormal.cpp @@ -416,18 +416,32 @@ void ScoreKeeperNormal::HandleTapScore( const TapNote &tn ) void ScoreKeeperNormal::HandleHoldCheckpointScore( const NoteData &nd, int iRow, int iNumHoldsHeldThisRow, int iNumHoldsMissedThisRow ) { - HandleTapNoteScoreInternal( iNumHoldsMissedThisRow == 0? TNS_CheckpointHit:TNS_CheckpointMiss, TNS_CheckpointHit ); + HandleTapNoteScoreInternal(iNumHoldsMissedThisRow == 0 ? TNS_CheckpointHit:TNS_CheckpointMiss, + TNS_CheckpointHit, iRow); HandleComboInternal( iNumHoldsHeldThisRow, 0, iNumHoldsMissedThisRow, iRow ); } -void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum ) +void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum, int row ) { // Update dance points. if( !m_pPlayerStageStats->m_bFailed ) m_pPlayerStageStats->m_iActualDancePoints += TapNoteScoreToDancePoints( tns ); - // update judged row totals - m_pPlayerStageStats->m_iTapNoteScores[tns] += 1; + // update judged row totals. Respect Combo segments here. + TimingData &td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing; + ComboSegment &cs = td.GetComboSegmentAtRow(row); + if (tns >= m_MinScoreToContinueCombo) + { + m_pPlayerStageStats->m_iTapNoteScores[tns] += cs.GetCombo(); + } + else if (tns < m_MinScoreToMaintainCombo) + { + m_pPlayerStageStats->m_iTapNoteScores[tns] += cs.GetMissCombo(); + } + else + { + m_pPlayerStageStats->m_iTapNoteScores[tns] += 1; + } // increment the current total possible dance score m_pPlayerStageStats->m_iCurPossibleDancePoints += TapNoteScoreToDancePoints( maximum ); @@ -519,7 +533,7 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow ) m_iNumNotesHitThisRow = iNumTapsInRow; TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteWithResult( nd, iRow ).result.tns; - HandleTapNoteScoreInternal( scoreOfLastTap, TNS_W1 ); + HandleTapNoteScoreInternal( scoreOfLastTap, TNS_W1, iRow ); if ( GAMESTATE->GetCurrentGame()->m_bCountNotesSeparately ) { diff --git a/src/ScoreKeeperNormal.h b/src/ScoreKeeperNormal.h index 9c9ab104bc..81a314a499 100644 --- a/src/ScoreKeeperNormal.h +++ b/src/ScoreKeeperNormal.h @@ -90,7 +90,12 @@ public: static int HoldNoteScoreToGradePoints( HoldNoteScore hns, bool bBeginner ); private: - void HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum ); + /** + * @brief Take care of some internal work with our scoring systems. + * @param tns the Tap Note score earned. + * @param maximum the best tap note score possible. + * @param row the row the score was earned. Mainly for ComboSegment stuff. */ + void HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum, int row ); void HandleComboInternal( int iNumHitContinueCombo, int iNumHitMaintainCombo, int iNumBreakCombo, int iRow = -1 ); void HandleRowComboInternal( TapNoteScore tns, int iNumTapsInRow, int iRow = -1 ); void GetRowCounts( const NoteData &nd, int iRow, int &iNumHitContinueCombo, int &iNumHitMaintainCombo, int &iNumBreakCombo );