mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-11 22:57:31 +00:00
Merge pull request #796 from FunkinCrew/lemz1/completion-fix
[PUBLIC PR] Fix an issue where getting the same rank (but a different clear %) will override the rating
This commit is contained in:
commit
06fee5599c
|
@ -603,11 +603,14 @@ class Save
|
|||
return;
|
||||
}
|
||||
|
||||
var newCompletion = (newScoreData.tallies.sick + newScoreData.tallies.good) / newScoreData.tallies.totalNotes;
|
||||
var previousCompletion = (previousScoreData.tallies.sick + previousScoreData.tallies.good) / previousScoreData.tallies.totalNotes;
|
||||
|
||||
// Set the high score and the high rank separately.
|
||||
var newScore:SaveScoreData =
|
||||
{
|
||||
score: (previousScoreData.score > newScoreData.score) ? previousScoreData.score : newScoreData.score,
|
||||
tallies: (previousRank > newRank) ? previousScoreData.tallies : newScoreData.tallies
|
||||
tallies: (previousRank > newRank || previousCompletion > newCompletion) ? previousScoreData.tallies : newScoreData.tallies
|
||||
};
|
||||
|
||||
song.set(difficultyId, newScore);
|
||||
|
|
Loading…
Reference in a new issue