From 3c43c1525347c6f56d65dd16b8d387dc6fd2a362 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 9 Nov 2015 17:55:56 +0000 Subject: [PATCH] Don't add dead entities to grid system. --- src/battle/entities.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/battle/entities.c b/src/battle/entities.c index 714fcf6..f1a965f 100644 --- a/src/battle/entities.c +++ b/src/battle/entities.c @@ -94,8 +94,6 @@ void doEntities(void) e->x += e->dx; e->y += e->dy; - addToGrid(e); - if (e->alive == ALIVE_DEAD) { if (e == battle.entityTail) @@ -119,6 +117,10 @@ void doEntities(void) free(e); e = prev; } + else + { + addToGrid(e); + } } if (e->type == ET_FIGHTER && (battle.epic || e->active))