fix: alguns minibugs tontos

This commit is contained in:
2024-10-27 19:04:05 +01:00
parent b90ac65cfc
commit d054e188b6

View File

@@ -89,8 +89,11 @@ Game::Game(int player_id, int current_stage, bool demo)
setTotalPower();
// Crea los primeros globos
createTwoBigBalloons();
evaluateAndSetMenace();
if (!demo_.enabled)
{
createTwoBigBalloons();
evaluateAndSetMenace();
}
}
Game::~Game()
@@ -244,7 +247,7 @@ void Game::deployBalloonFormation()
last_balloon_deploy_ = formation;
const auto set = balloon_formations_->getStage(0).balloon_pool.set[formation];
const auto set = balloon_formations_->getStage(current_stage_).balloon_pool.set[formation];
const auto numEnemies = set.number_of_balloons;
for (int i = 0; i < numEnemies; ++i)
{
@@ -604,7 +607,8 @@ void Game::startAllBalloons()
void Game::reverseColorsToAllBalloons()
{
for (auto &balloon : balloons_)
balloon->useReverseColor();
if (balloon->isStopped())
balloon->useReverseColor();
}
// Cambia el color de todos los globos