Any given step can continue the combo, maintain the combo, break the combo, or outright miss. Those that break the combo aren't misses and shouldn't increase the miss counter but they should break the combo.

Fixes bug 1738253.
This commit is contained in:
Steve Checkoway
2007-07-22 08:25:25 +00:00
parent 5fd893291d
commit 725f2e7c27
2 changed files with 14 additions and 11 deletions
+12 -9
View File
@@ -439,7 +439,7 @@ void ScoreKeeperNormal::HandleTapScore( const TapNote &tn )
void ScoreKeeperNormal::HandleHoldCheckpointScore( const NoteData &nd, int iRow, int iNumHoldsHeldThisRow, int iNumHoldsMissedThisRow ) 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 );
HandleComboInternal( iNumHoldsHeldThisRow, 0, iNumHoldsMissedThisRow ); HandleComboInternal( iNumHoldsHeldThisRow, 0, 0, iNumHoldsMissedThisRow );
} }
void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum ) void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum )
@@ -455,7 +455,7 @@ void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteSco
m_pPlayerStageStats->m_iCurPossibleDancePoints += TapNoteScoreToDancePoints( maximum ); m_pPlayerStageStats->m_iCurPossibleDancePoints += TapNoteScoreToDancePoints( maximum );
} }
void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumHitMaintainCombo, int iNumMissedInRow ) void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumHitMaintainCombo, int iNumBreakCombo, int iNumMissedInRow )
{ {
// //
// Regular combo // Regular combo
@@ -470,7 +470,7 @@ void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumH
if( iNumHitContinueCombo > 0 || iNumHitMaintainCombo > 0 ) if( iNumHitContinueCombo > 0 || iNumHitMaintainCombo > 0 )
m_pPlayerStageStats->m_iCurMissCombo = 0; m_pPlayerStageStats->m_iCurMissCombo = 0;
if( iNumMissedInRow > 0 ) if( iNumMissedInRow > 0 || iNumBreakCombo > 0 )
m_pPlayerStageStats->m_iCurCombo = 0; m_pPlayerStageStats->m_iCurCombo = 0;
if( iNumMissedInRow == 0 ) if( iNumMissedInRow == 0 )
@@ -480,10 +480,11 @@ void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumH
} }
void ScoreKeeperNormal::GetRowCounts( const NoteData &nd, int iRow, void ScoreKeeperNormal::GetRowCounts( const NoteData &nd, int iRow,
int &iNumHitContinueCombo, int &iNumHitMaintainCombo, int &iNumMissedInRow ) int &iNumHitContinueCombo, int &iNumHitMaintainCombo,
int &iNumBreakCombo, int &iNumMissedInRow )
{ {
PlayerNumber pn = m_pPlayerState->m_PlayerNumber; PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
iNumHitContinueCombo = iNumHitMaintainCombo = iNumMissedInRow = 0; iNumHitContinueCombo = iNumHitMaintainCombo = iNumBreakCombo = iNumMissedInRow = 0;
for( int track = 0; track < nd.GetNumTracks(); ++track ) for( int track = 0; track < nd.GetNumTracks(); ++track )
{ {
const TapNote &tn = nd.GetTapNote( track, iRow ); const TapNote &tn = nd.GetTapNote( track, iRow );
@@ -499,22 +500,24 @@ void ScoreKeeperNormal::GetRowCounts( const NoteData &nd, int iRow,
++iNumHitMaintainCombo; ++iNumHitMaintainCombo;
else if( tns == TNS_Miss || tns == TNS_None ) else if( tns == TNS_Miss || tns == TNS_None )
++iNumMissedInRow; ++iNumMissedInRow;
else
++iNumBreakCombo;
} }
} }
void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow ) void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
{ {
int iNumHitContinueCombo, iNumHitMaintainCombo, iNumMissedInRow; int iNumHitContinueCombo, iNumHitMaintainCombo, iNumBreakCombo, iNumMissedInRow;
GetRowCounts( nd, iRow, iNumHitContinueCombo, iNumHitMaintainCombo, iNumMissedInRow ); GetRowCounts( nd, iRow, iNumHitContinueCombo, iNumHitMaintainCombo, iNumBreakCombo, iNumMissedInRow );
int iNumTapsInRow = iNumHitContinueCombo + iNumHitMaintainCombo + iNumMissedInRow; int iNumTapsInRow = iNumHitContinueCombo + iNumHitMaintainCombo + iNumBreakCombo + iNumMissedInRow;
if( iNumTapsInRow <= 0 ) if( iNumTapsInRow <= 0 )
return; return;
TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteWithResult( nd, iRow, m_pPlayerState->m_PlayerNumber ).result.tns; TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteWithResult( nd, iRow, m_pPlayerState->m_PlayerNumber ).result.tns;
HandleTapNoteScoreInternal( scoreOfLastTap, TNS_W1 ); HandleTapNoteScoreInternal( scoreOfLastTap, TNS_W1 );
HandleComboInternal( iNumHitContinueCombo, iNumHitMaintainCombo, iNumMissedInRow ); HandleComboInternal( iNumHitContinueCombo, iNumHitMaintainCombo, iNumBreakCombo, iNumMissedInRow );
if( m_pPlayerState->m_PlayerNumber != PLAYER_INVALID ) if( m_pPlayerState->m_PlayerNumber != PLAYER_INVALID )
MESSAGEMAN->Broadcast( enum_add2(Message_CurrentComboChangedP1,m_pPlayerState->m_PlayerNumber) ); MESSAGEMAN->Broadcast( enum_add2(Message_CurrentComboChangedP1,m_pPlayerState->m_PlayerNumber) );
+2 -2
View File
@@ -62,8 +62,8 @@ public:
void HandleHoldCheckpointScore( const NoteData &nd, int iRow, int iNumHoldsHeldThisRow, int iNumHoldsMissedThisRow ); void HandleHoldCheckpointScore( const NoteData &nd, int iRow, int iNumHoldsHeldThisRow, int iNumHoldsMissedThisRow );
void HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum ); void HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteScore maximum );
void HandleComboInternal( int iNumHitContinueCombo, int iNumHitMaintainCombo, int iNumMissedInRow ); void HandleComboInternal( int iNumHitContinueCombo, int iNumHitMaintainCombo, int iNumBreakCombo, int iNumMissedInRow );
void GetRowCounts( const NoteData &nd, int iRow, int &iNumHitContinueCombo, int &iNumHitMaintainCombo, int &iNumMissedInRow ); void GetRowCounts( const NoteData &nd, int iRow, int &iNumHitContinueCombo, int &iNumHitMaintainCombo, int &iNumBreakCombo, int &iNumMissedInRow );
// This must be calculated using only cached radar values so that we can // This must be calculated using only cached radar values so that we can
// do it quickly. // do it quickly.