From 571782508949818530d58f09c9a8374ef952ba4c Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 9 Jun 2021 17:35:36 +0200 Subject: [PATCH] Fix all hearts being rendered if player health <= 0 --- plugins/game/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/game/game.c b/plugins/game/game.c index 74892c8..0e734a0 100644 --- a/plugins/game/game.c +++ b/plugins/game/game.c @@ -332,7 +332,7 @@ static void render(render_entity_list entity_list) set_color((struct color) {255, 0, 0}, false); for (int i = 0; i < player.max_health; i++) { - if (i == player.health) + if (i >= player.health) set_color(get_color("#5A5A5A"), false); printf("\u2665 "); } -- 2.44.0