From: Holger Schemel Date: Sat, 20 Jan 2001 22:50:28 +0000 (+0100) Subject: rnd-20010120-6-src X-Git-Tag: 2.0.1^2~24 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=673c51c61ad415fbdb1a69148fa67dfbeb0afcae;p=rocksndiamonds.git rnd-20010120-6-src --- diff --git a/src/game.c b/src/game.c index a3dd01df..811d103a 100644 --- a/src/game.c +++ b/src/game.c @@ -41,9 +41,10 @@ /* for Explode() */ #define EX_PHASE_START 0 -#define EX_NORMAL 0 -#define EX_CENTER 1 -#define EX_BORDER 2 +#define EX_NO_EXPLOSION 0 +#define EX_NORMAL 1 +#define EX_CENTER 2 +#define EX_BORDER 3 /* special positions in the game control window (relative to control window) */ #define XX_LEVEL 37 @@ -533,6 +534,7 @@ void InitGame() game.timegate_time_left = 0; game.switchgate_pos = 0; game.balloon_dir = MV_NO_MOVING; + game.explosions_delayed = TRUE; for (i=0; i<4; i++) { @@ -554,6 +556,7 @@ void InitGame() AmoebaNr[x][y] = 0; JustStopped[x][y] = 0; Stop[x][y] = FALSE; + ExplodeField[x][y] = EX_NO_EXPLOSION; } } @@ -1280,6 +1283,12 @@ void Explode(int ex, int ey, int phase, int mode) int half_phase = (num_phase / 2) * delay; int first_phase_after_start = EX_PHASE_START + 1; + if (game.explosions_delayed) + { + ExplodeField[ex][ey] = mode; + return; + } + if (phase == EX_PHASE_START) /* initialize 'Store[][]' field */ { int center_element = Feld[ex][ey]; @@ -4418,7 +4427,7 @@ void GameActions() ContinueMoving(x, y); else if (IS_ACTIVE_BOMB(element)) CheckDynamite(x, y); - else if (element == EL_EXPLODING) + else if (element == EL_EXPLODING && !game.explosions_delayed) Explode(x, y, Frame[x][y], EX_NORMAL); else if (element == EL_AMOEBING) AmoebeWaechst(x, y); @@ -4509,6 +4518,22 @@ void GameActions() } } + if (game.explosions_delayed) + { + game.explosions_delayed = FALSE; + + for (y=0; y