fixed flickering panel score when playing BD games with multiple lives
authorHolger Schemel <info@artsoft.org>
Tue, 21 Jan 2025 18:49:48 +0000 (19:49 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 21 Jan 2025 18:22:15 +0000 (19:22 +0100)
This change fixes displaying the cave score for one single frame when
playing BD games with multiple lives, therefore using global scores.

src/game.c

index 162e56a1b2d1b87386d943d20be0e403e7eca38b..b8299fb5efe14e4fd8c0925e32bfe17f65e0fba7 100644 (file)
@@ -5029,6 +5029,10 @@ void InitAmoebaNr(int x, int y)
 
 static void LevelSolved_UpdateFinalGameValues(int time, int score, int health)
 {
+  // correct game panel score value when playing BD games with multiple lives
+  if (level.game_engine_type == GAME_ENGINE_TYPE_BD && setup.bd_multiple_lives)
+    score = game_bd.global_score;
+
   game.LevelSolved_CountingTime = time;
   game.LevelSolved_CountingScore = score;
   game.LevelSolved_CountingHealth = health;
@@ -5205,9 +5209,6 @@ static boolean GameWon(void)
       time = time_final;
       score = score_final;
 
-      if (level.game_engine_type == GAME_ENGINE_TYPE_BD && setup.bd_multiple_lives)
-        score = game_bd.global_score;
-
       LevelSolved_DisplayFinalGameValues(time, score, health);
     }