From: Holger Schemel Date: Sun, 16 Sep 2018 11:27:19 +0000 (+0200) Subject: fixed nasty bug with uninitialized game engine value X-Git-Tag: 4.1.1.0~32 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=998abf7fcc9f6413625e61244d8cc49872870dbf fixed nasty bug with uninitialized game engine value This change fixed a nasty (although rarely occurring) bug caused by an uninitialized game engine value for explosion handling (which can only occur in the very first game frame of the very first game played after starting the program). This bug happens, for example, when doing "autotest rnd_helge_hafting" or "autotest rnd_paul_e_collins_iii 013", while (as described above) doing "autotest rnd_paul_e_collins_iii 012 013" works just fine (as the game engine is correctly initialized by playing level 012 when it comes to level 013, which contains that case of explosion in the first frame that would else be played differently, causing a failed tape). --- diff --git a/src/game.c b/src/game.c index 4c9c56e8..d9ac07ac 100644 --- a/src/game.c +++ b/src/game.c @@ -3573,6 +3573,8 @@ void InitGame() game.ball_state = level.ball_state_initial; game.ball_content_nr = 0; + game.explosions_delayed = TRUE; + game.envelope_active = FALSE; for (i = 0; i < NUM_BELTS; i++)