corregit: en el mode demo no calculava correctament el estat del fondo

This commit is contained in:
2025-09-30 09:56:32 +02:00
parent 19645445b2
commit a0fb6934b0
3 changed files with 49 additions and 2 deletions

View File

@@ -1551,8 +1551,9 @@ void Game::initDemo(Player::Id player_id) {
// Selecciona una pantalla al azar
constexpr auto NUM_STAGES = 3;
const auto STAGE = rand() % NUM_STAGES;
constexpr std::array<int, NUM_STAGES> STAGES = {0, 2, 4};
stage_manager_->jumpToStage(STAGES.at(STAGE));
constexpr std::array<float, NUM_STAGES> STAGES = {0.005F, 0.32F, 0.53F};
stage_manager_->setTotalPower(stage_manager_->getTotalPowerNeededToCompleteGame() * STAGES.at(STAGE));
background_->setProgress(stage_manager_->getTotalPower());
// Activa o no al otro jugador
if (rand() % 3 != 0) {