Use DYING and DEAD for ALIVE state, to prevent killing things too early (i.e - item pickups).

This commit is contained in:
Steve 2015-11-18 11:28:19 +00:00
parent c5c98e9317
commit 4c4d8e9a77
1 changed files with 5 additions and 1 deletions

View File

@ -197,10 +197,14 @@ static void restrictToGrid(Entity *e)
static void doEntity(void)
{
if (self->health <= 0)
if (self->alive == ALIVE_DYING)
{
self->alive = ALIVE_DEAD;
}
else if (self->health <= 0)
{
self->alive = ALIVE_DYING;
}
}
void drawEntities(void)