forked from jaildesigner-jailgames/jaildoctors_dilemma
Arreglado un poco el metodo de apertura de la Jail
This commit is contained in:
@@ -539,22 +539,16 @@ void Game::setScoreBoardColor()
|
||||
// Comprueba si ha finalizado el juego
|
||||
bool Game::checkEndGame()
|
||||
{
|
||||
const bool isOnTheRoom = room->getName() == "THE JAIL"; // Estar en la habitación que toca
|
||||
const bool haveTheItems = board.items >= int(totalItems * 0.9f); // Con mas del 90% de los items recogidos
|
||||
const bool isOnTheDoor = player->getRect().x <= 128; // Y en la ubicación que toca (En la puerta)
|
||||
const bool isOnTheRoom = room->getName() == "THE JAIL"; // Estar en la habitación que toca
|
||||
const bool haveTheItems = board.items >= int(totalItems * 0.9f) || options->cheat.jailEnabled; // Con mas del 90% de los items recogidos
|
||||
const bool isOnTheDoor = player->getRect().x <= 128; // Y en la ubicación que toca (En la puerta)
|
||||
|
||||
if (haveTheItems)
|
||||
{
|
||||
board.jailEnabled = true;
|
||||
}
|
||||
|
||||
if (isOnTheRoom && haveTheItems && isOnTheDoor)
|
||||
{
|
||||
section.name = SECTION_PROG_ENDING;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (options->cheat.jailEnabled && isOnTheRoom && isOnTheDoor)
|
||||
if (haveTheItems && isOnTheRoom && isOnTheDoor)
|
||||
{
|
||||
section.name = SECTION_PROG_ENDING;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user