From 8c9ad6d767a36e622d3cdbfaaff9af94a12e73be Mon Sep 17 00:00:00 2001 From: EyeDaleHim Date: Mon, 4 Dec 2023 17:19:50 +0800 Subject: [PATCH] fix crashes --- source/backend/LoadingManager.hx | 4 ++++ source/states/menus/FreeplayState.hx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/backend/LoadingManager.hx b/source/backend/LoadingManager.hx index de20bf6..ddc57c2 100644 --- a/source/backend/LoadingManager.hx +++ b/source/backend/LoadingManager.hx @@ -188,6 +188,8 @@ class LoadingManager extends MusicBeatState { var stageName:String = 'stage'; + trace(Song.currentSong.song.toLowerCase().replace(' ', '-')); + if (Song.currentSong != null) { stageName = switch (Song.currentSong.song.toLowerCase().replace(' ', '-')) @@ -210,6 +212,8 @@ class LoadingManager extends MusicBeatState 'dark-school'; case 'ugh' | 'guns' | 'stress': 'warzone'; + case 'lo-fight': + 'backalley'; default: 'stage-error'; }; diff --git a/source/states/menus/FreeplayState.hx b/source/states/menus/FreeplayState.hx index ee48ea9..19a81a7 100644 --- a/source/states/menus/FreeplayState.hx +++ b/source/states/menus/FreeplayState.hx @@ -160,7 +160,7 @@ class FreeplayState extends MusicBeatState FlxG.sound.music.fadeOut(0.5, 0.0); - Song.loadSong(songs[curSelected].name.formatToReadable(), availableDifficulties[curDifficulty]); + Song.loadSong(songs[curSelected].name.formatToReadable(), 'hard'); LoadingManager.startGame(); }