Make cannon scatter debris when it dies.
This commit is contained in:
parent
507327c853
commit
9cd0fc21f3
|
@ -117,6 +117,8 @@ static void die2(void)
|
||||||
addScorchDecal(mx, my);
|
addScorchDecal(mx, my);
|
||||||
|
|
||||||
addExplosion(u->x, u->y, 50, self);
|
addExplosion(u->x, u->y, 50, self);
|
||||||
|
|
||||||
|
throwDebris(u->x + u->w / 2, u->y + u->h / 2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u->alive == ALIVE_DYING && u->health <= -50)
|
if (u->alive == ALIVE_DYING && u->health <= -50)
|
||||||
|
@ -128,6 +130,8 @@ static void die2(void)
|
||||||
dropCarriedItem();
|
dropCarriedItem();
|
||||||
|
|
||||||
u->alive = ALIVE_DEAD;
|
u->alive = ALIVE_DEAD;
|
||||||
|
|
||||||
|
addRandomWeapon(u->x, u->y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "../../common.h"
|
#include "../../common.h"
|
||||||
|
|
||||||
extern void addExplosion(float x, float y, int radius, Entity *owner);
|
extern void addExplosion(float x, float y, int radius, Entity *owner);
|
||||||
|
extern void addRandomWeapon(int x, int y);
|
||||||
extern void addScorchDecal(int x, int y);
|
extern void addScorchDecal(int x, int y);
|
||||||
extern Unit *createUnit(void);
|
extern Unit *createUnit(void);
|
||||||
extern void dropCarriedItem(void);
|
extern void dropCarriedItem(void);
|
||||||
|
@ -30,6 +31,7 @@ extern int getDistance(int x1, int y1, int x2, int y2);
|
||||||
extern Sprite *getSprite(char *name);
|
extern Sprite *getSprite(char *name);
|
||||||
extern double randF(void);
|
extern double randF(void);
|
||||||
extern int rrnd(int low, int high);
|
extern int rrnd(int low, int high);
|
||||||
|
extern void throwDebris(float x, float y, int amount);
|
||||||
extern void updateObjective(char *targetName);
|
extern void updateObjective(char *targetName);
|
||||||
|
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
Loading…
Reference in New Issue