1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 11:22:55 +00:00

Merge pull request #772 from FunkinCrew/results-sfx-fix

Results Percentage Sound Spam Fix
This commit is contained in:
Eric 2024-09-19 03:24:52 -04:00 committed by GitHub
commit a128afedf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -472,9 +472,12 @@ class ResultState extends MusicBeatSubState
{
ease: FlxEase.quartOut,
onUpdate: _ -> {
clearPercentLerp = Math.round(clearPercentLerp);
clearPercentCounter.curNumber = Math.round(clearPercentCounter.curNumber);
// Only play the tick sound if the number increased.
if (clearPercentLerp != clearPercentCounter.curNumber)
{
trace('$clearPercentLerp and ${clearPercentCounter.curNumber}');
clearPercentLerp = clearPercentCounter.curNumber;
FunkinSound.playOnce(Paths.sound('scrollMenu'));
}