From f1811a8594c79f22447af3a62a81fdfb755a9217 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 27 Mar 2024 17:42:29 -0400 Subject: [PATCH 01/16] Implement Pico pause music --- assets | 2 +- source/funkin/play/PauseSubState.hx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets b/assets index 8013845e3..8ee8c3bd9 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 8013845e331015b40c4cc35230f6d02bd2148d52 +Subproject commit 8ee8c3bd9a828ced8e89c7c924842e859fea9a8c diff --git a/source/funkin/play/PauseSubState.hx b/source/funkin/play/PauseSubState.hx index f16aa00d8..ed847402a 100644 --- a/source/funkin/play/PauseSubState.hx +++ b/source/funkin/play/PauseSubState.hx @@ -230,7 +230,7 @@ class PauseSubState extends MusicBeatSubState */ function startPauseMusic():Void { - var pauseMusicPath:String = Paths.music('breakfast$musicSuffix'); + var pauseMusicPath:String = Paths.music('breakfast$musicSuffix/breakfast$musicSuffix'); pauseMusic = FunkinSound.load(pauseMusicPath, true, true); if (pauseMusic == null) From 195f366b6571b5a2dc99d6b2058a6b87b9c65a64 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 27 Mar 2024 17:43:15 -0400 Subject: [PATCH 02/16] Fix an issue where the Random button would crash Freeplay. --- source/funkin/audio/FunkinSound.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/funkin/audio/FunkinSound.hx b/source/funkin/audio/FunkinSound.hx index 6520ff27f..56b36d5df 100644 --- a/source/funkin/audio/FunkinSound.hx +++ b/source/funkin/audio/FunkinSound.hx @@ -399,10 +399,16 @@ class FunkinSound extends FlxSound implements ICloneable return sound; } + @:nullSafety(Off) public override function destroy():Void { // trace('[FunkinSound] Destroying sound "${this._label}"'); super.destroy(); + if (fadeTween != null) + { + fadeTween.cancel(); + fadeTween = null; + } FlxTween.cancelTweensOf(this); this._label = 'unknown'; } From f4dd11e2a976951355a047d97695d00be9f42b29 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 27 Mar 2024 18:44:59 -0400 Subject: [PATCH 03/16] Update more game audio. --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 8ee8c3bd9..46cbc7524 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 8ee8c3bd9a828ced8e89c7c924842e859fea9a8c +Subproject commit 46cbc752477fd973960efc658a3c62fd57007afe From 8fc7e82c61cbbcc3aa0b3957b53e449cf7e49e4d Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 27 Mar 2024 22:50:53 -0400 Subject: [PATCH 04/16] Update assets submodule --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 46cbc7524..be892870e 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 46cbc752477fd973960efc658a3c62fd57007afe +Subproject commit be892870e4d4397240d0b47275c4a8259583a942 From c1c2621e1d2412994863360e21701e1faf9823b0 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 28 Mar 2024 00:18:39 -0400 Subject: [PATCH 05/16] Fix bug where Bad and Shit didn't count at Notes Hit in the results screen. --- source/funkin/play/PlayState.hx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 6dc41e3f9..1cf69489d 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -2568,32 +2568,38 @@ class PlayState extends MusicBeatSubState */ function popUpScore(daNote:NoteSprite, score:Int, daRating:String, healthChange:Float):Void { - vocals.playerVolume = 1; - if (daRating == 'miss') { // If daRating is 'miss', that means we made a mistake and should not continue. - trace('[WARNING] popUpScore judged a note as a miss!'); + FlxG.log.warn('popUpScore judged a note as a miss!'); // TODO: Remove this. comboPopUps.displayRating('miss'); return; } + vocals.playerVolume = 1; + var isComboBreak = false; switch (daRating) { case 'sick': Highscore.tallies.sick += 1; + Highscore.tallies.totalNotesHit++; isComboBreak = Constants.JUDGEMENT_SICK_COMBO_BREAK; case 'good': Highscore.tallies.good += 1; + Highscore.tallies.totalNotesHit++; isComboBreak = Constants.JUDGEMENT_GOOD_COMBO_BREAK; case 'bad': Highscore.tallies.bad += 1; + Highscore.tallies.totalNotesHit++; isComboBreak = Constants.JUDGEMENT_BAD_COMBO_BREAK; case 'shit': Highscore.tallies.shit += 1; + Highscore.tallies.totalNotesHit++; isComboBreak = Constants.JUDGEMENT_SHIT_COMBO_BREAK; + default: + FlxG.log.error('Wuh? Buh? Guh? Note hit judgement was $daRating!'); } health += healthChange; From 837fcee98386cb150cb6e633054b4bb3b0900519 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 28 Mar 2024 00:19:57 -0400 Subject: [PATCH 06/16] Fix a bug where 000 would display any time a Bad or Shit is hit (instead of just when a combo break is hit) --- source/funkin/play/PlayState.hx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 1cf69489d..a161c04c5 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -2441,7 +2441,8 @@ class PlayState extends MusicBeatSubState if (Highscore.tallies.combo != 0) { // Break the combo. - Highscore.tallies.combo = comboPopUps.displayCombo(0); + if (Highscore.tallies.combo >= 10) comboPopUps.displayCombo(0); + Highscore.tallies.combo = 0; } if (playSound) @@ -2607,18 +2608,18 @@ class PlayState extends MusicBeatSubState if (isComboBreak) { // Break the combo, but don't increment tallies.misses. - Highscore.tallies.combo = comboPopUps.displayCombo(0); + if (Highscore.tallies.combo >= 10) comboPopUps.displayCombo(0); + Highscore.tallies.combo = 0; } else { Highscore.tallies.combo++; - Highscore.tallies.totalNotesHit++; if (Highscore.tallies.combo > Highscore.tallies.maxCombo) Highscore.tallies.maxCombo = Highscore.tallies.combo; } playerStrumline.hitNote(daNote, !isComboBreak); - if (daRating == "sick") + if (daRating == 'sick') { playerStrumline.playNoteSplash(daNote.noteData.getDirection()); } From 1c9b087f2ff6a597255311064f0e576565491d18 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 28 Mar 2024 21:20:08 -0400 Subject: [PATCH 07/16] Update assets submodule --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 485243fdd..65e6ff18c 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 485243fdd44acbc4db6a97ec7bf10a8b18350be9 +Subproject commit 65e6ff18c7fcbd646ac7a3676ca5c2baa95b5fea From 8020624366a48b1563945722744cca20702e078b Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 28 Mar 2024 21:40:16 -0400 Subject: [PATCH 08/16] Fix a crash I found. --- source/funkin/audio/VoicesGroup.hx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/funkin/audio/VoicesGroup.hx b/source/funkin/audio/VoicesGroup.hx index 91054cfb0..5037ee1d0 100644 --- a/source/funkin/audio/VoicesGroup.hx +++ b/source/funkin/audio/VoicesGroup.hx @@ -159,10 +159,18 @@ class VoicesGroup extends SoundGroup public override function destroy():Void { - playerVoices.destroy(); - playerVoices = null; - opponentVoices.destroy(); - opponentVoices = null; + if (playerVoices != null) + { + playerVoices.destroy(); + playerVoices = null; + } + + if (opponentVoices != null) + { + opponentVoices.destroy(); + opponentVoices = null; + } + super.destroy(); } } From aa7ff6fbc45a0820dc2da581ea5b84e44d5df7c7 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 28 Mar 2024 21:40:47 -0400 Subject: [PATCH 09/16] Update assets submodule --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 485243fdd..15c3f16c7 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 485243fdd44acbc4db6a97ec7bf10a8b18350be9 +Subproject commit 15c3f16c7ec162b7c8d86421b624d74501b9616f From 7c04630bb775161e9878e6554146a313aaab5c2a Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Fri, 29 Mar 2024 00:49:02 -0400 Subject: [PATCH 10/16] Fix a bug where duplicate notes would get placed at the beginning --- source/funkin/play/notes/Strumline.hx | 5 +++++ source/funkin/ui/transition/LoadingState.hx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/funkin/play/notes/Strumline.hx b/source/funkin/play/notes/Strumline.hx index 9a6699c43..a3b5dafc5 100644 --- a/source/funkin/play/notes/Strumline.hx +++ b/source/funkin/play/notes/Strumline.hx @@ -295,6 +295,11 @@ class Strumline extends FlxSpriteGroup { if (noteData.length == 0) return; + // Ensure note data gets reset if the song happens to loop. + // NOTE: I had to remove this line because it was causing notes visible during the countdown to be placed multiple times. + // I don't remember what bug I was trying to fix by adding this. + // if (conductorInUse.currentStep == 0) nextNoteIndex = 0; + var songStart:Float = PlayState.instance?.startTimestamp ?? 0.0; var hitWindowStart:Float = Conductor.instance.songPosition - Constants.HIT_WINDOW_MS; var renderWindowStart:Float = Conductor.instance.songPosition + RENDER_DISTANCE_MS; diff --git a/source/funkin/ui/transition/LoadingState.hx b/source/funkin/ui/transition/LoadingState.hx index 980c264e3..d913b8099 100644 --- a/source/funkin/ui/transition/LoadingState.hx +++ b/source/funkin/ui/transition/LoadingState.hx @@ -210,7 +210,8 @@ class LoadingState extends MusicBeatState } // Load and cache the song's charts. - if (params?.targetSong != null) + // Don't do this if we already provided the music and charts. + if (params?.targetSong != null && !params.overrideMusic) { params.targetSong.cacheCharts(true); } From 28462681b2af4a55c82fb60aa55b51ac4ab29966 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Fri, 29 Mar 2024 00:52:20 -0400 Subject: [PATCH 11/16] Fix bug where 100ms sustains wouldn't update their rendering. --- source/funkin/play/notes/Strumline.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/play/notes/Strumline.hx b/source/funkin/play/notes/Strumline.hx index a3b5dafc5..2b10c05ee 100644 --- a/source/funkin/play/notes/Strumline.hx +++ b/source/funkin/play/notes/Strumline.hx @@ -827,7 +827,7 @@ class Strumline extends FlxSpriteGroup { // The note sprite pool is full and all note splashes are active. // We have to create a new note. - result = new SustainTrail(0, 100, noteStyle); + result = new SustainTrail(0, 0, noteStyle); this.holdNotes.add(result); } From f50c1ce86fb38d5f5b95a864ed7e0de684414b70 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Fri, 29 Mar 2024 10:17:16 -0400 Subject: [PATCH 12/16] Update assets submodule --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 65e6ff18c..0965a86e2 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 65e6ff18c7fcbd646ac7a3676ca5c2baa95b5fea +Subproject commit 0965a86e2248bd9b8b2387f8b4f6b16385499db0 From 5be47e6619aa13ca6251c1c580d9dbc4ef330818 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Fri, 29 Mar 2024 10:34:59 -0400 Subject: [PATCH 13/16] Fix limo ride too --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 0965a86e2..5d78b0705 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 0965a86e2248bd9b8b2387f8b4f6b16385499db0 +Subproject commit 5d78b070535d6a1d88c5b450fc092eb6cd331f78 From 846df8de6fa3f207cc4a12cfa175215679c833ea Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 30 Mar 2024 03:06:39 -0400 Subject: [PATCH 14/16] assets submod --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 5d78b0705..3b168f7ca 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 5d78b070535d6a1d88c5b450fc092eb6cd331f78 +Subproject commit 3b168f7cac41e1843de9a223453d0ff4c04b0283 From 3637e3594ba85e1e0344ab33053b8960edd86b3b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 30 Mar 2024 03:24:30 -0400 Subject: [PATCH 15/16] assets submod --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 15c3f16c7..200658724 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 15c3f16c7ec162b7c8d86421b624d74501b9616f +Subproject commit 200658724592b298f49b13016f2c706c54ad538f From fe498b38e51babb076a1a94003be002dc17ac2fe Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 30 Mar 2024 03:32:17 -0400 Subject: [PATCH 16/16] assets submod --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 2a0afcd76..763c833cb 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 2a0afcd76a26251dbbebb6901df4651f25a92c23 +Subproject commit 763c833cbcde724d50ff31f5bac9f2ac3d5e61a7