fix: no guardar el fitxer de puntuacions en el modo demo

This commit is contained in:
2024-10-20 19:40:09 +02:00
parent 2377815c02
commit 3bf61fc758

View File

@@ -92,8 +92,11 @@ Game::Game(int player_id, int current_stage, bool demo)
Game::~Game() Game::~Game()
{ {
// Guarda las puntuaciones en un fichero // Guarda las puntuaciones en un fichero
if (!demo_.enabled)
{
auto manager = std::make_unique<ManageHiScoreTable>(&options.game.hi_score_table); auto manager = std::make_unique<ManageHiScoreTable>(&options.game.hi_score_table);
manager->saveToFile(asset_->get("score.bin")); manager->saveToFile(asset_->get("score.bin"));
}
#ifdef RECORDING #ifdef RECORDING
saveDemoFile(asset->get("demo1.bin")); saveDemoFile(asset->get("demo1.bin"));
#endif #endif