From 5da6916ff1df251bd2577d8e155e7be664d57ba1 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 5 Jan 2025 22:40:45 +0100 Subject: [PATCH] improved code logic (removed redundant condition) --- src/game.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/game.c b/src/game.c index adb0d905..3e85cbc2 100644 --- a/src/game.c +++ b/src/game.c @@ -3745,16 +3745,16 @@ void InitGame(void) if (level.game_engine_type == GAME_ENGINE_TYPE_BD) { - if (setup.bd_multiple_lives && game_status == GAME_MODE_MAIN) + if (!setup.bd_multiple_lives) { - // new BD game with multiple lives started, so set initial number of lives and global score - game_bd.global_lives = level.native_bd_level->caveset->initial_lives; + // new BD game with normal, single life started (resetting global score is important here) + game_bd.global_lives = 0; game_bd.global_score = 0; } - else if (!setup.bd_multiple_lives) + else if (game_status == GAME_MODE_MAIN) { - // new BD game with normal, single life started (resetting global score is important here) - game_bd.global_lives = 0; + // new BD game with multiple lives started, so set initial number of lives and global score + game_bd.global_lives = level.native_bd_level->caveset->initial_lives; game_bd.global_score = 0; } } -- 2.34.1