From becb2cc50199e3a2004d46ddd602493037909be7 Mon Sep 17 00:00:00 2001 From: Layla Marchant Date: Sat, 7 Mar 2020 12:23:37 -0500 Subject: [PATCH] Made engine still show when smoke shows, made smoke come out less. I reduced the chance of smoke happening a given frame from 1/5 to 1/10, and removed the check that stopped adding the "engine" effect to the player if low on shield, so it now shows both when damaged. --- src/game.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/game.c b/src/game.c index a7c6e7a..3e2a6f2 100644 --- a/src/game.c +++ b/src/game.c @@ -1538,8 +1538,7 @@ static void game_doPlayer() } } - if ((player.maxShield <= 1) || (player.shield > engine.lowShield)) - explosion_addEngine(&player); + explosion_addEngine(&player); shapeToUse = player.face; @@ -1550,7 +1549,7 @@ static void game_doPlayer() screen_blit(gfx_shipSprites[shapeToUse], (int)player.x, (int)player.y); if ((player.maxShield > 1) && (player.shield <= engine.lowShield) && - (rand() % 5 < 1)) + CHANCE(1. / 10)) explosion_add(player.x + RANDRANGE(-10, 10), player.y + RANDRANGE(-10, 20), SP_SMOKE); }