Fixed Grade display on MusicWheel not corresponding to top score

This commit is contained in:
Chris Danford
2002-10-07 05:45:59 +00:00
parent 1a40998fb3
commit f4ef92ab81
3 changed files with 28 additions and 11 deletions
+5 -2
View File
@@ -799,17 +799,20 @@ void Song::AddAutoGenNotes()
Grade Song::GetGradeForDifficulty( const StyleDef *st, int p, Difficulty dc ) const
{
// return max grade of notes in difficulty class
CArray<Notes*, Notes*> aNotes;
this->GetNotesThatMatch( st, p, aNotes );
SortNotesArrayByDifficulty( aNotes );
Grade grade = GRADE_NO_DATA;
for( int i=0; i<aNotes.GetSize(); i++ )
{
const Notes* pNotes = aNotes[i];
if( pNotes->m_Difficulty == dc )
return pNotes->m_TopGrade;
grade = max( grade, pNotes->m_TopGrade );
}
return GRADE_NO_DATA;
return grade;
}