Added EF_FRIENDLY_HEALTH_BAR.
This commit is contained in:
parent
c5cc733957
commit
0bb7ce2591
|
@ -432,7 +432,7 @@ static void drawHealthBar(Entity *e)
|
|||
r.w = 32;
|
||||
r.h = 1;
|
||||
|
||||
if (e->side == SIDE_ALLIES)
|
||||
if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR)
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 128, 0, 255);
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ static void drawHealthBar(Entity *e)
|
|||
|
||||
r.w = 32 * (e->health * 1.0f / e->maxHealth);
|
||||
|
||||
if (e->side == SIDE_ALLIES)
|
||||
if (e->side == SIDE_ALLIES || e->flags & EF_FRIENDLY_HEALTH_BAR)
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 0, 255, 0, 255);
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define EF_AI_IGNORE (2 << 19)
|
||||
#define EF_NON_SOLID (2 << 20)
|
||||
#define EF_NO_HEALTH_BAR (2 << 21)
|
||||
#define EF_FRIENDLY_HEALTH_BAR (2 << 22)
|
||||
|
||||
#define AIF_NONE 0
|
||||
#define AIF_FOLLOWS_PLAYER (2 << 0)
|
||||
|
|
|
@ -65,6 +65,7 @@ void initLookups(void)
|
|||
addLookup("EF_AI_LEADER", EF_AI_LEADER);
|
||||
addLookup("EF_NO_KILL_INC", EF_NO_KILL_INC);
|
||||
addLookup("EF_NO_MT_BOX", EF_NO_MT_BOX);
|
||||
addLookup("EF_FRIENDLY_HEALTH_BAR", EF_FRIENDLY_HEALTH_BAR);
|
||||
|
||||
addLookup("AIF_NONE", AIF_NONE);
|
||||
addLookup("AIF_MOVES_TO_PLAYER", AIF_MOVES_TO_PLAYER);
|
||||
|
|
Loading…
Reference in New Issue