From a8b65f529a7e078a248464435d899238ab6c7977 Mon Sep 17 00:00:00 2001 From: slime <85509162+seven-schmeckles@users.noreply.github.com> Date: Mon, 18 Dec 2023 07:05:59 -0600 Subject: [PATCH] opponent mode custom health bar colors fix --- source/funkin/game/PlayState.hx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index a79a10f7..790ef211 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -695,10 +695,9 @@ class PlayState extends MusicBeatState healthBar = new FlxBar(healthBarBG.x + 4, healthBarBG.y + 4, RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8), this, 'health', 0, maxHealth); healthBar.scrollFactor.set(); - var leftColor:Int = dad != null && dad.iconColor != null && Options.colorHealthBar ? dad.iconColor : 0xFFFF0000; - var rightColor:Int = boyfriend != null && boyfriend.iconColor != null && Options.colorHealthBar ? boyfriend.iconColor : 0xFF66FF33; - if (opponentMode) healthBar.createFilledBar(rightColor, leftColor); // switch the colors - else healthBar.createFilledBar(leftColor, rightColor); + var leftColor:Int = dad != null && dad.iconColor != null && Options.colorHealthBar ? dad.iconColor : (opponentMode ? 0xFF66FF33 : 0xFFFF0000); + var rightColor:Int = boyfriend != null && boyfriend.iconColor != null && Options.colorHealthBar ? boyfriend.iconColor : (opponentMode ? 0xFFFF0000 : 0xFF66FF33); // switch the colors + healthBar.createFilledBar(leftColor, rightColor); add(healthBar); health = maxHealth / 2;