Make Bob and enemies pop into white spheres when no blood option is selected.
This commit is contained in:
parent
96949ec97c
commit
c36c36dd60
|
@ -364,7 +364,14 @@ static void doDying(void)
|
||||||
{
|
{
|
||||||
world.bob->flags |= EF_GONE;
|
world.bob->flags |= EF_GONE;
|
||||||
|
|
||||||
throwFleshChunks(world.bob->x + world.bob->w / 2, world.bob->y + world.bob->h / 2, rrnd(3, 6));
|
if (app.config.blood)
|
||||||
|
{
|
||||||
|
throwFleshChunks(world.bob->x + world.bob->w / 2, world.bob->y + world.bob->h / 2, rrnd(3, 6));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
addPopParticles(world.bob->x + world.bob->w / 2, world.bob->y + world.bob->h / 2);
|
||||||
|
}
|
||||||
|
|
||||||
world.state = WS_GAME_OVER;
|
world.state = WS_GAME_OVER;
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ extern double randF(void);
|
||||||
extern int rrnd(int low, int high);
|
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 App app;
|
extern App app;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
|
@ -70,7 +70,14 @@ static void die2(void)
|
||||||
|
|
||||||
u->alive = ALIVE_DEAD;
|
u->alive = ALIVE_DEAD;
|
||||||
|
|
||||||
throwFleshChunks(u->x + u->w / 2, u->y + u->h / 2, rrnd(3, 6));
|
if (app.config.blood)
|
||||||
|
{
|
||||||
|
throwFleshChunks(u->x + u->w / 2, u->y + u->h / 2, rrnd(3, 6));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
addPopParticles(u->x + u->w / 2, u->y + u->h / 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (rand() % 100 < 35)
|
if (rand() % 100 < 35)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,7 @@ extern double randF(void);
|
||||||
extern int rrnd(int low, int high);
|
extern int rrnd(int low, int high);
|
||||||
extern void throwFleshChunks(float x, float y, int amount);
|
extern void throwFleshChunks(float x, float y, int amount);
|
||||||
extern void updateObjective(char *targetName);
|
extern void updateObjective(char *targetName);
|
||||||
|
extern void addPopParticles(float x, float y);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
|
|
|
@ -200,6 +200,28 @@ void addExplosionParticles(float x, float y, float radius, int amount)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addPopParticles(float x, float y)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
Particle *p;
|
||||||
|
|
||||||
|
for (i = 0; i < 12; i++)
|
||||||
|
{
|
||||||
|
p = createParticle();
|
||||||
|
p->type = PT_TEXTURED;
|
||||||
|
p->x = x;
|
||||||
|
p->y = y;
|
||||||
|
p->dx = (randF() - randF()) * 12;
|
||||||
|
p->dx /= 5;
|
||||||
|
p->dy = (randF() - randF()) * 12;
|
||||||
|
p->dy /= 5;
|
||||||
|
p->health = rrnd(FPS / 4, FPS);
|
||||||
|
p->spriteTime = -1;
|
||||||
|
p->spriteFrame = 0;
|
||||||
|
p->sprite = smokeSprite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void addTeleportStar(float x, float y)
|
void addTeleportStar(float x, float y)
|
||||||
{
|
{
|
||||||
Particle *p;
|
Particle *p;
|
||||||
|
|
Loading…
Reference in New Issue