Inc stat when Eyedroid explosions kills another enemy.
This commit is contained in:
parent
b8971a91f4
commit
7affe23a99
|
@ -71,6 +71,11 @@ void addExplosion(float x, float y, int radius, Entity *owner)
|
||||||
stunBob();
|
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)
|
if (e->health <= 0)
|
||||||
{
|
{
|
||||||
e->dx = rrnd(-radius / 8, radius / 8);
|
e->dx = rrnd(-radius / 8, radius / 8);
|
||||||
|
|
|
@ -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 int getDistance(int x1, int y1, int x2, int y2);
|
||||||
extern void swapSelf(Entity *e);
|
extern void swapSelf(Entity *e);
|
||||||
|
|
||||||
|
extern Game game;
|
||||||
|
|
Loading…
Reference in New Issue