Añadida opción para intercambiar los jugadores de los dos primeros mandos
This commit is contained in:
@@ -122,11 +122,14 @@ void Game::init(int playerID)
|
||||
player2->setController(controller2);
|
||||
players.push_back(player2);
|
||||
|
||||
// Obtiene el "id" del jugador que va a jugar
|
||||
Player *player = getPlayer(playerID);
|
||||
|
||||
// Cambia el estado del jugador seleccionado
|
||||
players[playerID]->setStatusPlaying(PLAYER_STATUS_PLAYING);
|
||||
player->setStatusPlaying(PLAYER_STATUS_PLAYING);
|
||||
|
||||
// Como es el principio del juego, empieza sin inmunidad
|
||||
players[playerID]->setInvulnerable(false);
|
||||
player->setInvulnerable(false);
|
||||
|
||||
// Variables relacionadas con la dificultad
|
||||
switch (difficulty)
|
||||
@@ -224,8 +227,9 @@ void Game::init(int playerID)
|
||||
// Activa o no al otro jugador
|
||||
if (rand() % 2 == 0)
|
||||
{
|
||||
const int otherPlayer = playerID == 1 ? 1 : 0;
|
||||
players[otherPlayer]->setStatusPlaying(PLAYER_STATUS_PLAYING);
|
||||
const int otherPlayer = playerID == 1 ? 2 : 1;
|
||||
Player *player = getPlayer(otherPlayer);
|
||||
player->setStatusPlaying(PLAYER_STATUS_PLAYING);
|
||||
}
|
||||
|
||||
for (auto player : players)
|
||||
|
||||
Reference in New Issue
Block a user