Use DYING and DEAD for ALIVE state, to prevent killing things too early (i.e - item pickups).
This commit is contained in:
parent
c5c98e9317
commit
4c4d8e9a77
|
@ -197,10 +197,14 @@ static void restrictToGrid(Entity *e)
|
||||||
|
|
||||||
static void doEntity(void)
|
static void doEntity(void)
|
||||||
{
|
{
|
||||||
if (self->health <= 0)
|
if (self->alive == ALIVE_DYING)
|
||||||
{
|
{
|
||||||
self->alive = ALIVE_DEAD;
|
self->alive = ALIVE_DEAD;
|
||||||
}
|
}
|
||||||
|
else if (self->health <= 0)
|
||||||
|
{
|
||||||
|
self->alive = ALIVE_DYING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawEntities(void)
|
void drawEntities(void)
|
||||||
|
|
Loading…
Reference in New Issue