Don't show health bars.

This commit is contained in:
Steve 2016-04-25 16:25:10 +01:00
parent 2cb6206ea9
commit 29620620c8
3 changed files with 9 additions and 3 deletions

View File

@ -48,9 +48,9 @@ void loadItemDefs(void)
STRNCPY(e->name, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH); STRNCPY(e->name, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH);
STRNCPY(e->defName, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH); STRNCPY(e->defName, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH);
e->texture = getTexture(cJSON_GetObjectItem(node, "texture")->valuestring); e->texture = getTexture(cJSON_GetObjectItem(node, "texture")->valuestring);
e->health = e->maxHealth = FPS; e->health = e->maxHealth = FPS;
e->flags = EF_NO_HEALTH_BAR;
SDL_QueryTexture(e->texture, NULL, NULL, &e->w, &e->h); SDL_QueryTexture(e->texture, NULL, NULL, &e->w, &e->h);
defTail->next = e; defTail->next = e;

View File

@ -48,6 +48,7 @@ Entity *spawnJumpgate(int side, long flags)
jumpgate->draw = draw; jumpgate->draw = draw;
jumpgate->side = side; jumpgate->side = side;
jumpgate->flags = EF_NO_MT_BOX+EF_IMMORTAL+EF_AI_IGNORE+EF_NON_SOLID+EF_NO_HEALTH_BAR; jumpgate->flags = EF_NO_MT_BOX+EF_IMMORTAL+EF_AI_IGNORE+EF_NON_SOLID+EF_NO_HEALTH_BAR;
if (flags != -1 && flags & EF_DISABLED) if (flags != -1 && flags & EF_DISABLED)
{ {
jumpgate->flags |= EF_DISABLED; jumpgate->flags |= EF_DISABLED;
@ -88,6 +89,11 @@ static void addNodes(Entity *jumpgate, long flags)
node->die = nodeDie; node->die = nodeDie;
SDL_QueryTexture(node->texture, NULL, NULL, &node->w, &node->h); SDL_QueryTexture(node->texture, NULL, NULL, &node->w, &node->h);
if (jumpgate->side == SIDE_NONE)
{
node->flags |= EF_NO_HEALTH_BAR;
}
if (flags != -1) if (flags != -1)
{ {
node->flags = flags; node->flags = flags;

View File

@ -49,7 +49,7 @@ Entity *spawnMine(int type)
mine->texture = (type == ET_MINE) ? mineNormal : shadowMine; mine->texture = (type == ET_MINE) ? mineNormal : shadowMine;
mine->action = think; mine->action = think;
mine->die = die; mine->die = die;
mine->flags = EF_TAKES_DAMAGE+EF_NO_PLAYER_TARGET+EF_SHORT_RADAR_RANGE+EF_NON_SOLID; mine->flags = EF_TAKES_DAMAGE+EF_NO_PLAYER_TARGET+EF_SHORT_RADAR_RANGE+EF_NON_SOLID+EF_NO_HEALTH_BAR;
if (type == ET_SHADOW_MINE) if (type == ET_SHADOW_MINE)
{ {