diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-06-09 17:35:36 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-06-09 17:35:36 +0200 |
commit | 571782508949818530d58f09c9a8374ef952ba4c (patch) | |
tree | 8d4c97b85eedb2405625a9907a5457f3dac8d264 | |
parent | 70374f3ca40208261ae728c12cdf91e8506ff578 (diff) | |
download | dungeon_game-571782508949818530d58f09c9a8374ef952ba4c.tar.xz |
Fix all hearts being rendered if player health <= 0
-rw-r--r-- | plugins/game/game.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 "); } |