Prevent player from moving if system power <= 0.

This commit is contained in:
Steve 2016-05-08 19:00:14 +01:00
parent 86e0443067
commit f51557f801
1 changed files with 11 additions and 11 deletions

View File

@ -93,7 +93,7 @@ void doPlayer(void)
battle.boostTimer = MIN(battle.boostTimer + 1, BOOST_RECHARGE_TIME);
battle.ecmTimer = MIN(battle.ecmTimer + 1, ECM_RECHARGE_TIME);
if (player->alive == ALIVE_ALIVE)
if (player->alive == ALIVE_ALIVE && player->systemPower > 0)
{
self = player;
@ -143,16 +143,6 @@ void doPlayer(void)
}
}
/* really only used in challenge mode */
if (player->systemPower <= 0 && battle.status == MS_IN_PROGRESS)
{
if (game.currentMission->challengeData.isChallenge)
{
addHudMessage(colors.red, _("Challenge Failed!"));
failMission();
}
}
if (battle.status == MS_IN_PROGRESS)
{
selectMissionTarget();
@ -164,6 +154,16 @@ void doPlayer(void)
}
}
/* really only used in challenge mode */
if (player->systemPower <= 0 && battle.status == MS_IN_PROGRESS)
{
if (game.currentMission->challengeData.isChallenge)
{
addHudMessage(colors.red, _("Challenge Failed!"));
failMission();
}
}
if (battle.boostTimer == (int)BOOST_FINISHED_TIME)
{
deactivateBoost();