Entity drawing bug fix.

This commit is contained in:
Steve 2016-04-03 08:37:45 +01:00
parent e7190150bf
commit 8537e5207f
1 changed files with 6 additions and 1 deletions

View File

@ -592,11 +592,12 @@ void countNumEnemies(void)
void addVisibleEntsToDrawList(void)
{
int numEntsToDraw = 0;
Entity *e;
battle.camera.x = player->x - (SCREEN_WIDTH / 2);
battle.camera.y = player->y - (SCREEN_HEIGHT / 2);
numEntsToDraw = 0;
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
{
@ -635,4 +636,8 @@ void destroyEntities(void)
}
deadTail = &deadHead;
free(entsToDraw);
entsToDraw = NULL;
}