From 4c4d8e9a77ed7f7f505f18f6ec282bd6f2edb1b9 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 18 Nov 2015 11:28:19 +0000 Subject: [PATCH] Use DYING and DEAD for ALIVE state, to prevent killing things too early (i.e - item pickups). --- src/battle/entities.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/battle/entities.c b/src/battle/entities.c index d1cb735..56757f4 100644 --- a/src/battle/entities.c +++ b/src/battle/entities.c @@ -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)