mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-15 11:22:55 +00:00
Fix issues with the difficulty selector showing non-existant difficulties in Freeplay
This commit is contained in:
parent
386dc22d7b
commit
e5673549cf
|
@ -354,10 +354,6 @@ class FreeplayState extends MusicBeatSubState
|
||||||
if (availableDifficultiesForSong.length == 0) continue;
|
if (availableDifficultiesForSong.length == 0) continue;
|
||||||
|
|
||||||
songs.push(new FreeplaySongData(levelId, songId, song, displayedVariations));
|
songs.push(new FreeplaySongData(levelId, songId, song, displayedVariations));
|
||||||
for (difficulty in availableDifficultiesForSong)
|
|
||||||
{
|
|
||||||
diffIdsTotal.pushUnique(difficulty);
|
|
||||||
}
|
|
||||||
for (difficulty in unsuffixedDifficulties)
|
for (difficulty in unsuffixedDifficulties)
|
||||||
{
|
{
|
||||||
diffIdsTotal.pushUnique(difficulty);
|
diffIdsTotal.pushUnique(difficulty);
|
||||||
|
@ -1764,12 +1760,13 @@ class FreeplayState extends MusicBeatSubState
|
||||||
var songScore:Null<SaveScoreData> = Save.instance.getSongScore(daSong.songId, suffixedDifficulty);
|
var songScore:Null<SaveScoreData> = Save.instance.getSongScore(daSong.songId, suffixedDifficulty);
|
||||||
intendedScore = songScore?.score ?? 0;
|
intendedScore = songScore?.score ?? 0;
|
||||||
intendedCompletion = songScore == null ? 0.0 : ((songScore.tallies.sick + songScore.tallies.good) / songScore.tallies.totalNotes);
|
intendedCompletion = songScore == null ? 0.0 : ((songScore.tallies.sick + songScore.tallies.good) / songScore.tallies.totalNotes);
|
||||||
rememberedDifficulty = currentDifficulty;
|
rememberedDifficulty = suffixedDifficulty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
intendedScore = 0;
|
intendedScore = 0;
|
||||||
intendedCompletion = 0.0;
|
intendedCompletion = 0.0;
|
||||||
|
rememberedDifficulty = currentDifficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intendedCompletion == Math.POSITIVE_INFINITY || intendedCompletion == Math.NEGATIVE_INFINITY || Math.isNaN(intendedCompletion))
|
if (intendedCompletion == Math.POSITIVE_INFINITY || intendedCompletion == Math.NEGATIVE_INFINITY || Math.isNaN(intendedCompletion))
|
||||||
|
|
Loading…
Reference in a new issue