From 184768c287bad09895925ab907847e63959cc789 Mon Sep 17 00:00:00 2001 From: Fusion243 Date: Sat, 17 Aug 2024 11:55:34 +0100 Subject: [PATCH] Fixed a couple bugs i found - Put the camPos var outside of the lua/hscript stuff to fix a compiling error when they are both disabled. - Moved persistentUpdate above the weeksList.length check to stop it from setting to true even if there are no weeks loaded. --- source/states/PlayState.hx | 3 ++- source/states/StoryMenuState.hx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index f7576a498cf..8917012466d 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -419,6 +419,7 @@ class PlayState extends MusicBeatState initHScript(folder + file); #end } + #end var camPos:FlxPoint = FlxPoint.get(girlfriendCameraOffset[0], girlfriendCameraOffset[1]); if(gf != null) @@ -433,7 +434,7 @@ class PlayState extends MusicBeatState gf.visible = false; } - + #if (LUA_ALLOWED || HSCRIPT_ALLOWED) // STAGE SCRIPTS #if LUA_ALLOWED startLuasNamed('stages/' + curStage + '.lua'); #end #if HSCRIPT_ALLOWED startHScriptsNamed('stages/' + curStage + '.hx'); #end diff --git a/source/states/StoryMenuState.hx b/source/states/StoryMenuState.hx index 001a684d96f..5c9380b9b70 100644 --- a/source/states/StoryMenuState.hx +++ b/source/states/StoryMenuState.hx @@ -48,6 +48,7 @@ class StoryMenuState extends MusicBeatState Paths.clearStoredMemory(); Paths.clearUnusedMemory(); + persistentUpdate = persistentDraw = true; PlayState.isStoryMode = true; WeekData.reloadWeekFiles(true); @@ -67,7 +68,6 @@ class StoryMenuState extends MusicBeatState } if(curWeek >= WeekData.weeksList.length) curWeek = 0; - persistentUpdate = persistentDraw = true; scoreText = new FlxText(10, 10, 0, Language.getPhrase('week_score', 'WEEK SCORE: {1}', [lerpScore]), 36); scoreText.setFormat("VCR OSD Mono", 32);