Inc stat when Eyedroid explosions kills another enemy.

This commit is contained in:
Steve 2018-02-18 11:52:30 +00:00
parent b8971a91f4
commit 7affe23a99
2 changed files with 7 additions and 1 deletions

View File

@ -70,7 +70,12 @@ void addExplosion(float x, float y, int radius, Entity *owner)
{
stunBob();
}
if (owner->type == ET_ENEMY && e->health <= 0 && e->type == ET_ENEMY && strstr(((Unit*)owner)->unitType, "EyeDroid"))
{
game.stats[STAT_EYE_DROID_EXPLOSION_KILLS]++;
}
if (e->health <= 0)
{
e->dx = rrnd(-radius / 8, radius / 8);

View File

@ -28,3 +28,4 @@ extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
extern int getDistance(int x1, int y1, int x2, int y2);
extern void swapSelf(Entity *e);
extern Game game;