Skip to content

Commit

Permalink
[BUGFIX] A-Bot reacts to volume on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGamingSW committed Sep 28, 2024
1 parent 3ef238a commit c53e4f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions source/funkin/audio/visualize/ABotVis.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
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));
Expand Down
4 changes: 1 addition & 3 deletions source/funkin/ui/charSelect/CharSelectGF.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c53e4f3

Please sign in to comment.