Don't add dead entities to grid system.

This commit is contained in:
Steve 2015-11-09 17:55:56 +00:00
parent 1cd8b42664
commit 3c43c15253
1 changed files with 4 additions and 2 deletions

View File

@ -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))