fix rounding for sound results sfx

This commit is contained in:
Cameron Taylor 2024-09-18 15:07:15 -04:00
parent 4bc2510d3c
commit ab3b976f3c

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'));
}