From f50f8c99224c48037f6359994217b76d750e002b Mon Sep 17 00:00:00 2001 From: MaybeMaru <97055307+MaybeMaru@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:44:32 +0200 Subject: [PATCH] fix storymode stage transition also the ugh animation has been broken for god knows how long how tf did i miss that --- assets/songs/ugh/charts/easy.json | 8 ++++---- assets/songs/ugh/charts/hard.json | 8 ++++---- assets/songs/ugh/charts/normal.json | 8 ++++---- source/funkin/ScriptConsole.hx | 10 +++++++--- source/funkin/states/PlayState.hx | 7 ++++--- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/assets/songs/ugh/charts/easy.json b/assets/songs/ugh/charts/easy.json index 2ba6bf07..b997371a 100644 --- a/assets/songs/ugh/charts/easy.json +++ b/assets/songs/ugh/charts/easy.json @@ -37,7 +37,7 @@ [5062.5,1,0], [5250,0,281.25], [5625,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -291,7 +291,7 @@ [41062.5,1,0], [41250,0,281.25], [41625,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -338,7 +338,7 @@ [48750,1,0], [48937.5,3,0], [49125,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -521,7 +521,7 @@ [77062.5,1,0], [77250,0,281.25], [77625,2,0, - true + "default-alt" ] ], "mustHitSection": false diff --git a/assets/songs/ugh/charts/hard.json b/assets/songs/ugh/charts/hard.json index ec6b9768..e82adaf7 100644 --- a/assets/songs/ugh/charts/hard.json +++ b/assets/songs/ugh/charts/hard.json @@ -51,7 +51,7 @@ [5062.5,0,0], [5250,3,281.25], [5625,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -403,7 +403,7 @@ [41062.5,3,0], [41250,0,281.25], [41625,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -468,7 +468,7 @@ [48843.75,2,0], [48937.5,3,0], [49125,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -737,7 +737,7 @@ [77062.5,3,0], [77250,0,281.25], [77625,2,0, - true + "default-alt" ] ], "mustHitSection": false diff --git a/assets/songs/ugh/charts/normal.json b/assets/songs/ugh/charts/normal.json index 176cca7a..bad6369a 100644 --- a/assets/songs/ugh/charts/normal.json +++ b/assets/songs/ugh/charts/normal.json @@ -47,7 +47,7 @@ [5062.5,0,0], [5250,3,281.25], [5625,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -375,7 +375,7 @@ [41062.5,3,0], [41250,0,281.25], [41625,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -434,7 +434,7 @@ [48843.75,0,0], [48937.5,1,0], [49125,2,0, - true + "default-alt" ] ], "mustHitSection": false @@ -683,7 +683,7 @@ [77062.5,3,0], [77250,0,281.25], [77625,2,0, - true + "default-alt" ] ], "mustHitSection": false diff --git a/source/funkin/ScriptConsole.hx b/source/funkin/ScriptConsole.hx index 98e07924..4ce33b33 100644 --- a/source/funkin/ScriptConsole.hx +++ b/source/funkin/ScriptConsole.hx @@ -87,14 +87,15 @@ class Print extends Sprite { return color = textField.textColor = value; } - public var timer:Float = 7.0; + public var timer:Float = 7; inline public function resetTimer() { - timer = 7.0; + timer = 7; alpha = 1; } inline public function hide() { - timer = 0.0; + text = ""; // Clear text rendering crap + timer = 0; alpha = 0; } @@ -102,6 +103,9 @@ class Print extends Sprite { if (timer > 0) { timer -= e; alpha = timer; + if (alpha <= 0) { + hide(); + } } } } diff --git a/source/funkin/states/PlayState.hx b/source/funkin/states/PlayState.hx index 40479d42..583bf0e2 100644 --- a/source/funkin/states/PlayState.hx +++ b/source/funkin/states/PlayState.hx @@ -683,14 +683,15 @@ class PlayState extends MusicBeatState PlayState.SONG = Song.loadFromFile(curDifficulty, nextSong); Conductor.stop(); - // Reset cam follow if the stage changed - prevCamFollow = (SONG.stage == curStage) ? camFollow : null; + // Reset cam follow and enable transition if the stage changed + final changedStage:Bool = (SONG.stage != curStage); + prevCamFollow = changedStage ? null : camFollow; seenCutscene = false; clearCache = true; clearCacheData = {tempCache: false, skins: false} ModdingUtil.addCall('switchSong', [nextSong, curDifficulty]); // Could be used to change cache clear - switchState(new PlayState(), true); + switchState(new PlayState(), !changedStage); } override function startTransition() {