Add blood decal when Bob dies.
This commit is contained in:
parent
c36c36dd60
commit
39573010b7
|
@ -360,6 +360,8 @@ static void doBobInWater(void)
|
||||||
|
|
||||||
static void doDying(void)
|
static void doDying(void)
|
||||||
{
|
{
|
||||||
|
int mx, my;
|
||||||
|
|
||||||
if (--world.bob->health <= -(FPS * 2))
|
if (--world.bob->health <= -(FPS * 2))
|
||||||
{
|
{
|
||||||
world.bob->flags |= EF_GONE;
|
world.bob->flags |= EF_GONE;
|
||||||
|
@ -384,6 +386,10 @@ static void doDying(void)
|
||||||
playSound(SND_POP, world.bob->uniqueId % MAX_SND_CHANNELS);
|
playSound(SND_POP, world.bob->uniqueId % MAX_SND_CHANNELS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mx = (int) ((world.bob->x + (world.bob->w / 2)) / MAP_TILE_SIZE);
|
||||||
|
my = (int) (world.bob->y / MAP_TILE_SIZE) + 1;
|
||||||
|
addBloodDecal(mx, my);
|
||||||
|
|
||||||
game.stats[STAT_DEATHS]++;
|
game.stats[STAT_DEATHS]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ extern int rrnd(int low, int high);
|
||||||
extern void setGameplayMessage(int type, char *format, ...);
|
extern void setGameplayMessage(int type, char *format, ...);
|
||||||
extern void throwFleshChunks(float x, float y, int amount);
|
extern void throwFleshChunks(float x, float y, int amount);
|
||||||
extern void addPopParticles(float x, float y);
|
extern void addPopParticles(float x, float y);
|
||||||
|
extern void addBloodDecal(int x, int y);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
Loading…
Reference in New Issue