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

@ -453,7 +453,9 @@ static void spawnEnemies(void)
{
sprintf(name, "%s%s", world.enemyTypes[r], (rand() % 2 ? "Blob" : "EyeDroid"));
u = (Unit*) createEntity(name);
u = (Unit*)createEntity(name);
self = (Entity*)u;
u->animate();

View File

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