Afegit un lock per evitar que es puga incrementar el poder de la fase

Es necesita almenys un jugador viu per a poder incrementar el poder de la fase
This commit is contained in:
2025-01-04 14:09:10 +01:00
parent 7b8f16610a
commit 81ee352553
7 changed files with 43 additions and 46 deletions

View File

@@ -10,6 +10,7 @@
#include "texture.h" // Para Texture
#include "resource.h"
#include "jail_audio.h"
#include "stage.h"
// Constructor
Player::Player(int id, float x, int y, bool demo, SDL_Rect &play_area, std::vector<std::shared_ptr<Texture>> texture, const std::vector<std::vector<std::string>> &animations)
@@ -503,6 +504,7 @@ void Player::setPlayingState(PlayerState state)
init();
playing_state_ = PlayerState::PLAYING;
setScoreboardMode(ScoreboardMode::SCORE);
Stage::power_can_be_added = true;
break;
}
case PlayerState::CONTINUE: