Skip to content

Commit

Permalink
make abot not run like shit
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Sep 1, 2024
1 parent 0f9ca8d commit 89f83f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions source/game/graphics/ABotVis.hx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ class ABotVis extends FlxSpriteGroup
viz.animation.play('VIZ', false, false, 6);
}


#if desktop
@:privateAccess
analyzer = new SpectralAnalyzer(FlxG.sound.music._channel.__audioSource , 7, 0.01, 30);
analyzer = new SpectralAnalyzer(FlxG.sound.music._channel.__audioSource , 7, 0.1, 40);
#end
analyzer.fftN = 256;

//analyzer.maxDb = -35;
}

Expand All @@ -69,7 +72,7 @@ class ABotVis extends FlxSpriteGroup
var lvls = levels.length;
for (i in 0...(grp > lvls ? lvls : grp))
{
var animFrame:Int = Math.round(levels[i].value * 5);
var animFrame:Int = Math.round(levels[i].value * 5 * FlxG.sound.volume);
animFrame = Math.floor(FlxMath.bound(animFrame, 0, 5));

//animFrame = Math.floor(Math.min(5, animFrame));
Expand Down
2 changes: 1 addition & 1 deletion source/toolbox/CharacterCreator.hx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class CharacterCreator extends MusicBeatState {

FlxG.camera = charCam;

if (FlxG.sound.music.active)
if (FlxG.sound?.music.active)
FlxG.sound.music.stop();

reloadStage();
Expand Down

0 comments on commit 89f83f2

Please sign in to comment.