From c53e4f3ef2e1e12d7dd38bb4579329a402c8f8e6 Mon Sep 17 00:00:00 2001 From: AlexGamingSW <60404369+AlexGamingSW@users.noreply.github.com> Date: Sat, 28 Sep 2024 19:52:23 +0400 Subject: [PATCH] [BUGFIX] A-Bot reacts to volume on desktop --- source/funkin/audio/visualize/ABotVis.hx | 4 +--- source/funkin/ui/charSelect/CharSelectGF.hx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/source/funkin/audio/visualize/ABotVis.hx b/source/funkin/audio/visualize/ABotVis.hx index 4d2243b7c2..349f555a33 100644 --- a/source/funkin/audio/visualize/ABotVis.hx +++ b/source/funkin/audio/visualize/ABotVis.hx @@ -102,9 +102,7 @@ class ABotVis extends FlxTypedSpriteGroup var animFrame:Int = Math.round(levels[i].value * 5); #if desktop - // Web version scales with the Flixel volume level. - // This line brings platform parity but looks worse. - // animFrame = Math.round(animFrame * FlxG.sound.volume); + animFrame = Math.round(animFrame * (Math.round(FlxG.sound.logToLinear(FlxG.sound.volume) * 10) / 10)); #end animFrame = Math.floor(Math.min(5, animFrame)); diff --git a/source/funkin/ui/charSelect/CharSelectGF.hx b/source/funkin/ui/charSelect/CharSelectGF.hx index e8eeded40f..dd8681b522 100644 --- a/source/funkin/ui/charSelect/CharSelectGF.hx +++ b/source/funkin/ui/charSelect/CharSelectGF.hx @@ -109,9 +109,7 @@ class CharSelectGF extends FlxAtlasSprite implements IBPMSyncedScriptedClass var animFrame:Int = Math.round(levels[i].value * 12); #if desktop - // Web version scales with the Flixel volume level. - // This line brings platform parity but looks worse. - // animFrame = Math.round(animFrame * FlxG.sound.volume); + animFrame = Math.round(animFrame * (Math.round(FlxG.sound.logToLinear(FlxG.sound.volume) * 10) / 10)); #end animFrame = Math.floor(Math.min(12, animFrame));