fix: ja no es pot continuar quan els dos jugadors han acabat el compte enrrere per continuar
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
|
||||||
#define DEATH_COUNTER 350
|
#define GAME_OVER_COUNTER 350
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Game::Game(int playerID, int currentStage, Screen *screen, Asset *asset, Lang *lang, Input *input, bool demo, param_t *param, options_t *options, section_t *section, JA_Music_t *music)
|
Game::Game(int playerID, int currentStage, Screen *screen, Asset *asset, Lang *lang, Input *input, bool demo, param_t *param, options_t *options, section_t *section, JA_Music_t *music)
|
||||||
@@ -173,7 +173,7 @@ void Game::init(int playerID)
|
|||||||
menaceThreshold = 0;
|
menaceThreshold = 0;
|
||||||
hiScoreAchieved = false;
|
hiScoreAchieved = false;
|
||||||
stageBitmapCounter = STAGE_COUNTER;
|
stageBitmapCounter = STAGE_COUNTER;
|
||||||
gameOverCounter = DEATH_COUNTER;
|
gameOverCounter = GAME_OVER_COUNTER;
|
||||||
timeStopped = false;
|
timeStopped = false;
|
||||||
timeStoppedCounter = 0;
|
timeStoppedCounter = 0;
|
||||||
counter = 0;
|
counter = 0;
|
||||||
@@ -2351,7 +2351,11 @@ void Game::checkInput()
|
|||||||
// Si no está jugando, el botón de start le permite continuar jugando
|
// Si no está jugando, el botón de start le permite continuar jugando
|
||||||
if (input->checkInput(input_start, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
if (input->checkInput(input_start, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
||||||
{
|
{
|
||||||
player->setStatusPlaying(PLAYER_STATUS_PLAYING);
|
// Si no ha entrado ya en el estado de game over, entonces se puede continuar
|
||||||
|
if (gameOverCounter == GAME_OVER_COUNTER)
|
||||||
|
{
|
||||||
|
player->setStatusPlaying(PLAYER_STATUS_PLAYING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si está continuando, los botones de fuego hacen decrementar el contador
|
// Si está continuando, los botones de fuego hacen decrementar el contador
|
||||||
|
|||||||
Reference in New Issue
Block a user