Add blood decal when Bob dies.

This commit is contained in:
Steve 2018-03-21 08:14:29 +00:00
parent c36c36dd60
commit 39573010b7
2 changed files with 7 additions and 0 deletions

View File

@ -360,6 +360,8 @@ static void doBobInWater(void)
static void doDying(void)
{
int mx, my;
if (--world.bob->health <= -(FPS * 2))
{
world.bob->flags |= EF_GONE;
@ -384,6 +386,10 @@ static void doDying(void)
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]++;
}
}

View File

@ -47,6 +47,7 @@ extern int rrnd(int low, int high);
extern void setGameplayMessage(int type, char *format, ...);
extern void throwFleshChunks(float x, float y, int amount);
extern void addPopParticles(float x, float y);
extern void addBloodDecal(int x, int y);
extern App app;
extern Dev dev;