Skip to content

Commit

Permalink
re-evaluate whether or not a score was obtained with chord cohesion b…
Browse files Browse the repository at this point in the history
…y matching note counts for completed scores

this fixes an issue with improper assignment due to (???) as well as legacy scores on no-chord files being unfairly marked as ccon
  • Loading branch information
MinaciousGrace committed Sep 17, 2017
1 parent 1b78562 commit 2208f4e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,21 @@ void ScoreManager::RecalculateSSRs(LoadingWindow *ld) {
nd.UnsetNerv();
nd.UnsetSerializedNoteData();
steps->Compress();

/* Some scores were being incorrectly marked as ccon despite chord cohesion being disabled. Re-determine chord cohesion
status from notecount, this should be robust as every score up to this point should be a fully completed pass. This will
also allow us to mark files with 0 chords as being nocc (since it doesn't apply to them). -mina */
int totalstepsnotes = steps->GetRadarValues()[RadarCategory_Notes];
int totalscorenotes = 0;
totalscorenotes += hs->GetTapNoteScore(TNS_W1);
totalscorenotes += hs->GetTapNoteScore(TNS_W2);
totalscorenotes += hs->GetTapNoteScore(TNS_W3);
totalscorenotes += hs->GetTapNoteScore(TNS_W4);
totalscorenotes += hs->GetTapNoteScore(TNS_W5);
totalscorenotes += hs->GetTapNoteScore(TNS_Miss);

if (totalstepsnotes - totalscorenotes == 0)
hs->SetChordCohesion(1); // we are setting nochordcohesion to 1 here, functions should be renamed? -mina
}
return;
}
Expand Down

0 comments on commit 2208f4e

Please sign in to comment.