From ba8e068b800f0020efe4673698748a53c7713f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Tue, 13 Aug 2024 19:25:12 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20fallava=20al=20parar=20la=20musica=20al?= =?UTF-8?q?=20morir=20el=20jugador=20en=20el=20mode=20de=20demostraci?= =?UTF-8?q?=C3=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/game.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/game.cpp b/source/game.cpp index 781a73d..07a13d5 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -218,7 +218,7 @@ void Game::init(int playerID) // Añade 0, 1 o 2 cafes al jugador for (int i = 0; i < rand() % 3; ++i) { - //player->giveExtraHit(); + player->giveExtraHit(); } // Empieza sin inmunidad @@ -1812,15 +1812,18 @@ void Game::killPlayer(Player *player) } else { // Si no tiene cafes, muere - JA_PauseMusic(); + if (!demo.enabled) + { + JA_PauseMusic(); + } stopAllBalloons(10); JA_PlaySound(playerCollisionSound); screen->shake(); JA_PlaySound(coffeeOutSound); player->setAlive(false); - allPlayersAreDead() ? JA_StopMusic() : JA_ResumeMusic(); if (!demo.enabled) - { + { // En el modo DEMO ni se para la musica ni se añade la puntuación a la tabla + allPlayersAreDead() ? JA_StopMusic() : JA_ResumeMusic(); addScoreToScoreBoard("Sergio", player->getScore()); } }