summaryrefslogtreecommitdiff
path: root/src/gui/status.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/status.cpp')
-rw-r--r--src/gui/status.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index 0c20b6fc..10b6431d 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -309,16 +309,13 @@ void StatusWindow::update()
{
hpBar->setColor(223, 32, 32); // Red
}
+ else if (player_info->hp < int((player_info->maxHp / 3) * 2))
+ {
+ hpBar->setColor(230, 171, 34); // Orange
+ }
else
{
- if (player_info->hp < int((player_info->maxHp / 3) * 2))
- {
- hpBar->setColor(230, 171, 34); // Orange
- }
- else
- {
- hpBar->setColor(0, 171, 34); // Green
- }
+ hpBar->setColor(0, 171, 34); // Green
}
hpBar->setProgress((float)player_info->hp / (float)player_info->maxHp);