Skip to content

Commit

Permalink
Fix lifts
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram committed Mar 27, 2018
1 parent 6408140 commit 23731a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
17 changes: 9 additions & 8 deletions src/ScoreKeeperNormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ void ScoreKeeperNormal::HandleTapScore( const TapNote &tn )
void ScoreKeeperNormal::HandleHoldCheckpointScore( const NoteData &nd, int iRow, int iNumHoldsHeldThisRow, int iNumHoldsMissedThisRow )
{
HandleTapNoteScoreInternal( nd, iNumHoldsMissedThisRow == 0 ? TNS_CheckpointHit:TNS_CheckpointMiss,
TNS_CheckpointHit, iRow);
TNS_CheckpointHit, iRow, GAMESTATE->CountNotesSeparately());
HandleComboInternal( iNumHoldsHeldThisRow, 0, iNumHoldsMissedThisRow, iRow );
}

void ScoreKeeperNormal::HandleTapNoteScoreInternal( const NoteData &nd, TapNoteScore tns, TapNoteScore maximum, int row )
void ScoreKeeperNormal::HandleTapNoteScoreInternal( const NoteData &nd, TapNoteScore tns, TapNoteScore maximum, int row, bool separately)
{
int notes = 0;

Expand All @@ -389,7 +389,7 @@ void ScoreKeeperNormal::HandleTapNoteScoreInternal( const NoteData &nd, TapNoteS
// Update dance points.
if ( !m_pPlayerStageStats->m_bFailed )
{
if ( GAMESTATE->CountNotesSeparately() )
if (separately)
{
m_pPlayerStageStats->m_iActualDancePoints += (TapNoteScoreToDancePoints(tns)*nd.GetNumTracksLCD()) / notes;
}
Expand All @@ -400,7 +400,7 @@ void ScoreKeeperNormal::HandleTapNoteScoreInternal( const NoteData &nd, TapNoteS
}

// increment the current total possible dance score
if ( GAMESTATE->CountNotesSeparately() )
if (separately)
{
m_pPlayerStageStats->m_iCurPossibleDancePoints += (TapNoteScoreToDancePoints(maximum)*nd.GetNumTracksLCD()) / notes;
}
Expand Down Expand Up @@ -503,16 +503,17 @@ void ScoreKeeperNormal::GetRowCounts( const NoteData &nd, int iRow,
void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
{
int iNumHitContinueCombo, iNumHitMaintainCombo, iNumBreakCombo;
GetRowCounts( nd, iRow, iNumHitContinueCombo, iNumHitMaintainCombo, iNumBreakCombo );
GetRowCounts(nd, iRow, iNumHitContinueCombo, iNumHitMaintainCombo, iNumBreakCombo);

int iNumTapsInRow = iNumHitContinueCombo + iNumHitMaintainCombo + iNumBreakCombo;
if( iNumTapsInRow <= 0 )
return;

TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteWithResult( nd, iRow ).result.tns;
HandleTapNoteScoreInternal( nd, scoreOfLastTap, TNS_W1, iRow );
TapNote lastTap = NoteDataWithScoring::LastTapNoteWithResult(nd, iRow);
TapNoteScore scoreOfLastTap = lastTap.result.tns;
HandleTapNoteScoreInternal(nd, scoreOfLastTap, TNS_W1, iRow, GAMESTATE->CountNotesSeparately() && lastTap.type != TapNoteType_Lift);

if ( GAMESTATE->CountNotesSeparately() )
if ( GAMESTATE->CountNotesSeparately())
{
// HandleTapRowScore gets called on every judgment,
// so we only want increment up by one each time.
Expand Down
8 changes: 4 additions & 4 deletions src/ScoreKeeperNormal.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ class ScoreKeeperNormal: public ScoreKeeper
* @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(const NoteData &nd, 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 );
void HandleTapNoteScoreInternal(const NoteData &nd, TapNoteScore tns, TapNoteScore maximum, int row, bool separately);
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);

};

Expand Down

0 comments on commit 23731a8

Please sign in to comment.