Assign self when spawning enemies.

This commit is contained in:
Steve 2018-02-08 22:25:10 +00:00
parent 46d9983142
commit 70d1101ded
2 changed files with 4 additions and 1 deletions

View File

@ -455,6 +455,8 @@ static void spawnEnemies(void)
u = (Unit*)createEntity(name); u = (Unit*)createEntity(name);
self = (Entity*)u;
u->animate(); u->animate();
x /= MAP_TILE_SIZE; x /= MAP_TILE_SIZE;

View File

@ -73,5 +73,6 @@ extern void playMusic(int loop);
extern App app; extern App app;
extern Colors colors; extern Colors colors;
extern Dev dev; extern Dev dev;
extern Entity *self;
extern Game game; extern Game game;
extern World world; extern World world;