diff --git a/src/entities/blobs/bob.c b/src/entities/blobs/bob.c index b17ea1d..4245224 100644 --- a/src/entities/blobs/bob.c +++ b/src/entities/blobs/bob.c @@ -364,7 +364,14 @@ static void doDying(void) { 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; diff --git a/src/entities/blobs/bob.h b/src/entities/blobs/bob.h index c0ce690..5cb9601 100644 --- a/src/entities/blobs/bob.h +++ b/src/entities/blobs/bob.h @@ -46,6 +46,7 @@ extern double randF(void); 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 App app; extern Dev dev; diff --git a/src/entities/evilBlobs/evilBlob.c b/src/entities/evilBlobs/evilBlob.c index a16689d..a46371a 100644 --- a/src/entities/evilBlobs/evilBlob.c +++ b/src/entities/evilBlobs/evilBlob.c @@ -70,7 +70,14 @@ static void die2(void) 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) { diff --git a/src/entities/evilBlobs/evilBlob.h b/src/entities/evilBlobs/evilBlob.h index 8302cda..9f8aeb1 100644 --- a/src/entities/evilBlobs/evilBlob.h +++ b/src/entities/evilBlobs/evilBlob.h @@ -34,6 +34,7 @@ extern double randF(void); extern int rrnd(int low, int high); extern void throwFleshChunks(float x, float y, int amount); extern void updateObjective(char *targetName); +extern void addPopParticles(float x, float y); extern App app; extern Dev dev; diff --git a/src/world/particles.c b/src/world/particles.c index 3ebc93c..2b90af4 100644 --- a/src/world/particles.c +++ b/src/world/particles.c @@ -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) { Particle *p;