From 2198db980b50ef2614524ee8da753a5f4f274c30 Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 10 May 2016 09:59:39 +0100 Subject: [PATCH] Health bars should be green for player-align craft. --- src/battle/entities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/battle/entities.c b/src/battle/entities.c index 358c9f2..3fb3f70 100644 --- a/src/battle/entities.c +++ b/src/battle/entities.c @@ -196,7 +196,7 @@ void doEntities(void) if (e->type == ET_FIGHTER || e->type == ET_CAPITAL_SHIP) { - if (e->side == SIDE_ALLIES) + if (e->side == player->side) { numAllies++; @@ -430,7 +430,7 @@ static void drawHealthBar(Entity *e) r.w = 32; r.h = 1; - if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR) + if (e->side == player->side || e->flags & EF_FRIENDLY_HEALTH_BAR) { SDL_SetRenderDrawColor(app.renderer, 0, 128, 0, 255); } @@ -443,7 +443,7 @@ static void drawHealthBar(Entity *e) r.w = 32 * (e->health * 1.0f / e->maxHealth); - if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR) + if (e->side == player->side || e->flags & EF_FRIENDLY_HEALTH_BAR) { SDL_SetRenderDrawColor(app.renderer, 0, 255, 0, 255); }