Skip to content

Commit

Permalink
Fix total possible dp being too high for chord cohesion off.
Browse files Browse the repository at this point in the history
  • Loading branch information
xwidghet committed Mar 18, 2017
1 parent 569bf34 commit 98302d3
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions src/ScoreKeeperNormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,28 +430,40 @@ void ScoreKeeperNormal::HandleHoldCheckpointScore( const NoteData &nd, int iRow,

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

if ( GAMESTATE->CountNotesSeparately() )
{
for (int i = 0; i < nd.GetNumTracks(); i++)
{
if ( nd.GetTapNote(i, row).IsNote() )
notes++;
}
}

// Update dance points.
if ( !m_pPlayerStageStats->m_bFailed )
{
float scoreWeight = 1;
if ( GAMESTATE->CountNotesSeparately() )
{
int notes = 0;

for (int i = 0; i < nd.GetNumTracks(); i++)
{
if (nd.GetTapNote(i, row).IsNote())
notes++;
}

m_pPlayerStageStats->m_iActualDancePoints += (TapNoteScoreToDancePoints( tns )*nd.GetNumTracksLCD()) / notes;
m_pPlayerStageStats->m_iActualDancePoints += (TapNoteScoreToDancePoints(tns)*nd.GetNumTracksLCD()) / notes;
}
else
{
m_pPlayerStageStats->m_iActualDancePoints += TapNoteScoreToDancePoints(tns);
}
}

// increment the current total possible dance score
if ( GAMESTATE->CountNotesSeparately() )
{
m_pPlayerStageStats->m_iCurPossibleDancePoints += (TapNoteScoreToDancePoints(maximum)*nd.GetNumTracksLCD()) / notes;
}
else
{
m_pPlayerStageStats->m_iCurPossibleDancePoints += TapNoteScoreToDancePoints(maximum);
}

// update judged row totals. Respect Combo segments here.
TimingData &td = *GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->GetTimingData();
ComboSegment *cs = td.GetComboSegmentAtRow(row);
Expand All @@ -467,9 +479,6 @@ void ScoreKeeperNormal::HandleTapNoteScoreInternal( const NoteData &nd, TapNoteS
{
m_pPlayerStageStats->m_iTapNoteScores[tns] += 1;
}

// increment the current total possible dance score
m_pPlayerStageStats->m_iCurPossibleDancePoints += TapNoteScoreToDancePoints( maximum );
}

void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumHitMaintainCombo, int iNumBreakCombo, int iRow )
Expand Down

0 comments on commit 98302d3

Please sign in to comment.