From 394e8c663bd8d73df7cf0346c185cdb4b25a878d Mon Sep 17 00:00:00 2001 From: Gede Hari Date: Thu, 10 Dec 2020 08:47:28 +0800 Subject: [PATCH] Fixes MainMenu not playing music after playing/exiting level --- source/MainMenuState.hx | 9 ++++++--- source/TitleState.hx | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 6cad3b3e1..cabf8f046 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -29,6 +29,11 @@ class MainMenuState extends MusicBeatState override function create() { + if (!FlxG.sound.music.playing) + { + FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt); + } + persistentUpdate = persistentDraw = true; var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png); @@ -114,12 +119,10 @@ class MainMenuState extends MusicBeatState if (optionShit[curSelected] == 'donate') { #if linux - Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]); + Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]); #else - FlxG.openURL('https://ninja-muffin24.itch.io/funkin'); #end - } else { diff --git a/source/TitleState.hx b/source/TitleState.hx index ba0012ec6..24f8a4d86 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -51,10 +51,10 @@ class TitleState extends MusicBeatState super.create(); - #if ng - var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); - trace('NEWGROUNDS LOL'); - #end + /* #if ng + var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey); + trace('NEWGROUNDS LOL'); + #end */ FlxG.save.bind('funkin', 'ninjamuffin99');