From 74dac9d8305f7db082e8a8a4739d5f788b45ca93 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 22 Aug 2023 23:18:37 -0400 Subject: [PATCH] Fix a story mode bug where charts would sometimes not be loaded for the second and third song. (#134) --- source/funkin/play/PlayState.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index d01c7b049..ed82d6e99 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -2561,6 +2561,9 @@ class PlayState extends MusicBeatSubState FlxG.sound.play(Paths.sound('Lights_Shut_off'), function() { // no camFollow so it centers on horror tree var targetSong:Song = SongDataParser.fetchSong(targetSongId); + // Load and cache the song's charts. + // TODO: Do this in the loading state. + targetSong.cacheCharts(true); var nextPlayState:PlayState = new PlayState( { @@ -2575,6 +2578,9 @@ class PlayState extends MusicBeatSubState else { var targetSong:Song = SongDataParser.fetchSong(targetSongId); + // Load and cache the song's charts. + // TODO: Do this in the loading state. + targetSong.cacheCharts(true); var nextPlayState:PlayState = new PlayState( { targetSong: targetSong,