From 656bb3bec3b7f38fd373cfd9c94b3ccb4152df6c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 17 Dec 2020 15:03:33 -0500 Subject: [PATCH] fix crash --- CHANGELOG.md | 1 + source/PlayState.hx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f39c89b3..84ecd5f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] ### Fixed +- Crash when playing Week 3 and then playing a non-week 3 song - When pausing music at the start, it doesn't continue the song anyways. ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48)) - IDK i think backing out of song menu should play main menu songs again hehe ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48)) diff --git a/source/PlayState.hx b/source/PlayState.hx index 1a58bc483..408948235 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -135,6 +135,7 @@ class PlayState extends MusicBeatState if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') { + curState = "spooky"; halloweenLevel = true; var hallowTex = FlxAtlasFrames.fromSparrow(AssetPaths.halloween_bg__png, AssetPaths.halloween_bg__xml); @@ -192,6 +193,7 @@ class PlayState extends MusicBeatState } else { + curStage = 'stage'; var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png); // bg.setGraphicSize(Std.int(bg.width * 2.5)); // bg.updateHitbox(); @@ -974,6 +976,7 @@ class PlayState extends MusicBeatState trace(PlayState.storyPlaylist[0].toLowerCase() + difficulty); PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + difficulty, PlayState.storyPlaylist[0]); + FlxG.sound.music.stop(); FlxG.switchState(new PlayState()); } }