don't give 3 miss combo if you hit 1 and miss 2; only give 2 miss combo
This commit is contained in:
@@ -438,10 +438,11 @@ 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, iNumHoldsHeldThisRow+iNumHoldsMissedThisRow );
|
||||
HandleTapNoteScoreInternal( iNumHoldsMissedThisRow == 0? TNS_CheckpointHit:TNS_CheckpointMiss, TNS_CheckpointHit );
|
||||
HandleComboInternal( iNumHoldsHeldThisRow, 0, iNumHoldsMissedThisRow );
|
||||
}
|
||||
|
||||
void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum, int iNumTapsInRow )
|
||||
void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum )
|
||||
{
|
||||
// Update dance points.
|
||||
if( !m_pPlayerStageStats->m_bFailed )
|
||||
@@ -452,36 +453,68 @@ void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteSco
|
||||
|
||||
// increment the current total possible dance score
|
||||
m_pPlayerStageStats->m_iCurPossibleDancePoints += TapNoteScoreToDancePoints( maximum );
|
||||
}
|
||||
|
||||
void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumHitMaintainCombo, int iNumMissedInRow )
|
||||
{
|
||||
//
|
||||
// Regular combo
|
||||
//
|
||||
const int iComboCountIfHit = m_ComboIsPerRow? 1: iNumTapsInRow;
|
||||
if( tns >= m_MinScoreToMaintainCombo )
|
||||
if( m_ComboIsPerRow )
|
||||
{
|
||||
m_pPlayerStageStats->m_iCurMissCombo = 0;
|
||||
if( tns >= m_MinScoreToContinueCombo )
|
||||
m_pPlayerStageStats->m_iCurCombo += iComboCountIfHit;
|
||||
iNumHitContinueCombo = min( iNumHitContinueCombo, 1 );
|
||||
iNumHitMaintainCombo = min( iNumHitMaintainCombo, 1 );
|
||||
iNumMissedInRow = min( iNumMissedInRow, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if( iNumHitContinueCombo > 0 || iNumHitMaintainCombo > 0 )
|
||||
m_pPlayerStageStats->m_iCurMissCombo = 0;
|
||||
|
||||
if( iNumMissedInRow > 0 )
|
||||
m_pPlayerStageStats->m_iCurCombo = 0;
|
||||
if( tns == TNS_Miss || tns == TNS_CheckpointMiss )
|
||||
m_pPlayerStageStats->m_iCurMissCombo += iComboCountIfHit;
|
||||
|
||||
if( iNumMissedInRow == 0 )
|
||||
m_pPlayerStageStats->m_iCurCombo += iNumHitContinueCombo;
|
||||
else
|
||||
m_pPlayerStageStats->m_iCurMissCombo += iNumMissedInRow;
|
||||
}
|
||||
|
||||
void ScoreKeeperNormal::GetRowCounts( const NoteData &nd, int iRow,
|
||||
int &iNumHitContinueCombo, int &iNumHitMaintainCombo, int &iNumMissedInRow )
|
||||
{
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
iNumHitContinueCombo = iNumHitMaintainCombo = iNumMissedInRow = 0;
|
||||
for( int track = 0; track < nd.GetNumTracks(); ++track )
|
||||
{
|
||||
const TapNote &tn = nd.GetTapNote( track, iRow );
|
||||
|
||||
if( tn.pn != PLAYER_INVALID && tn.pn != pn )
|
||||
continue;
|
||||
if( tn.type != TapNote::tap && tn.type != TapNote::hold_head )
|
||||
continue;
|
||||
TapNoteScore tns = tn.result.tns;
|
||||
if( tns >= m_MinScoreToContinueCombo )
|
||||
++iNumHitContinueCombo;
|
||||
else if( tns >= m_MinScoreToMaintainCombo )
|
||||
++iNumHitMaintainCombo;
|
||||
else if( tns == TNS_Miss || tns == TNS_None )
|
||||
++iNumMissedInRow;
|
||||
}
|
||||
}
|
||||
|
||||
void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
|
||||
{
|
||||
TapNoteScore scoreOfLastTap;
|
||||
int iNumTapsInRow;
|
||||
|
||||
GetScoreOfLastTapInRow( nd, iRow, scoreOfLastTap, iNumTapsInRow );
|
||||
|
||||
int iNumHitContinueCombo, iNumHitMaintainCombo, iNumMissedInRow;
|
||||
GetRowCounts( nd, iRow, iNumHitContinueCombo, iNumHitMaintainCombo, iNumMissedInRow );
|
||||
|
||||
int iNumTapsInRow = iNumHitContinueCombo + iNumHitMaintainCombo + iNumMissedInRow;
|
||||
if( iNumTapsInRow <= 0 )
|
||||
return;
|
||||
|
||||
HandleTapNoteScoreInternal( scoreOfLastTap, TNS_W1, iNumTapsInRow );
|
||||
TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteWithResult( nd, iRow, m_pPlayerState->m_PlayerNumber ).result.tns;
|
||||
HandleTapNoteScoreInternal( scoreOfLastTap, TNS_W1 );
|
||||
|
||||
HandleComboInternal( iNumHitContinueCombo, iNumHitMaintainCombo, iNumMissedInRow );
|
||||
|
||||
if( m_pPlayerState->m_PlayerNumber != PLAYER_INVALID )
|
||||
MESSAGEMAN->Broadcast( enum_add2(Message_CurrentComboChangedP1,m_pPlayerState->m_PlayerNumber) );
|
||||
|
||||
Reference in New Issue
Block a user