diff --git a/source/funkin/game/HealthIcon.hx b/source/funkin/game/HealthIcon.hx index d55bf14b5..70f5024bf 100644 --- a/source/funkin/game/HealthIcon.hx +++ b/source/funkin/game/HealthIcon.hx @@ -85,12 +85,11 @@ class HealthIcon extends FlxSprite if (animation.curAnim != null) { var i:Int = -1; var oldKey:Int = -1; - for(k=>icon in healthSteps) { - if (k > oldKey && k < health * 100) { - oldKey = k; - i = icon; - } + for (k=>icon in healthSteps) if (k > oldKey && k <= health * 100) { + oldKey = k; + i = icon; } + if (i >= 0) animation.curAnim.curFrame = i; } } diff --git a/source/funkin/menus/PauseSubState.hx b/source/funkin/menus/PauseSubState.hx index 16c017862..45a18a634 100644 --- a/source/funkin/menus/PauseSubState.hx +++ b/source/funkin/menus/PauseSubState.hx @@ -14,6 +14,7 @@ import funkin.options.keybinds.KeybindsOptions; import funkin.menus.StoryMenuState; import funkin.backend.system.Conductor; import funkin.backend.utils.FunkinParentDisabler; +import funkin.options.TreeMenu; class PauseSubState extends MusicBeatSubstate { @@ -160,6 +161,7 @@ class PauseSubState extends MusicBeatSubstate removeVirtualPad(); openSubState(new KeybindsOptions()); case "Change Options": + TreeMenu.lastState = PlayState; FlxG.switchState(new OptionsMenu()); case "Exit to charter": FlxG.switchState(new funkin.editors.charter.Charter(PlayState.SONG.meta.name, PlayState.difficulty, false)); @@ -220,4 +222,4 @@ class PauseSubState extends MusicBeatSubstate item.alpha = 0.6; } } -} \ No newline at end of file +}