fixed showing number of BD diamonds needed if determined at run-time
authorHolger Schemel <holger.schemel@virtion.de>
Thu, 26 Sep 2024 21:12:17 +0000 (23:12 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Thu, 26 Sep 2024 21:14:42 +0000 (23:14 +0200)
src/game.c

index c8989ce35fbdffc310411507e16a1691fa33820b..d6f1927ee0b54b34f31f55522a52e2295c00f5ee 100644 (file)
@@ -2331,7 +2331,9 @@ static void UpdateGameControlValues(void)
              level.game_engine_type == GAME_ENGINE_TYPE_MM ?
              game_mm.kettles_still_needed :
              game.gems_still_needed);
-  int gems_needed = level.gems_needed;
+  int gems_needed = (level.game_engine_type == GAME_ENGINE_TYPE_BD ?
+                    game_bd.game->cave->diamonds_needed :
+                    level.gems_needed);
   int gems_collected = (level.game_engine_type == GAME_ENGINE_TYPE_BD ?
                        game_bd.game->cave->diamonds_collected :
                        gems_needed - gems);