Capital ship component name bug fix.

This commit is contained in:
Steve 2016-04-25 16:24:58 +01:00
parent 9dd027b825
commit 2cb6206ea9
1 changed files with 10 additions and 4 deletions

View File

@ -561,7 +561,10 @@ void updateCapitalShipComponentProperties(Entity *parent, long flags)
{ {
Entity *e; Entity *e;
if (flags != -1)
{
flags &= ~EF_AI_LEADER; flags &= ~EF_AI_LEADER;
}
for (e = battle.entityHead.next ; e != NULL ; e = e->next) for (e = battle.entityHead.next ; e != NULL ; e = e->next)
{ {
@ -584,9 +587,12 @@ void updateCapitalShipComponentProperties(Entity *parent, long flags)
e->active = parent->active; e->active = parent->active;
if (flags != -1)
{
e->flags |= flags; e->flags |= flags;
} }
} }
}
} }
void loadCapitalShips(cJSON *node) void loadCapitalShips(cJSON *node)
@ -659,9 +665,9 @@ void loadCapitalShips(cJSON *node)
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Flags for '%s' (%s) replaced", e->name, e->defName); SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Flags for '%s' (%s) replaced", e->name, e->defName);
} }
}
updateCapitalShipComponentProperties(e, flags); updateCapitalShipComponentProperties(e, flags);
}
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "%s (%d / %d)", e->name, e->health, e->maxHealth); SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "%s (%d / %d)", e->name, e->health, e->maxHealth);
} }