diff --git a/src/combat/explosions.c b/src/combat/explosions.c index 3f25ba9..7bbdf41 100644 --- a/src/combat/explosions.c +++ b/src/combat/explosions.c @@ -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); diff --git a/src/combat/explosions.h b/src/combat/explosions.h index 33fc9c2..514b36f 100644 --- a/src/combat/explosions.h +++ b/src/combat/explosions.h @@ -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;