Boost finished timer needs to be doubled on Easy mode, due to increased boost recharge.

This commit is contained in:
Steve 2017-05-16 08:13:54 +01:00
parent b8d3348681
commit 1ade5e6c38
1 changed files with 5 additions and 2 deletions

View File

@ -43,6 +43,7 @@ static void updateDeathStats(void);
static int selectedPlayerIndex; static int selectedPlayerIndex;
static int availableGuns[BT_MAX]; static int availableGuns[BT_MAX];
static Entity *availablePlayerUnits[MAX_SELECTABLE_PLAYERS]; static Entity *availablePlayerUnits[MAX_SELECTABLE_PLAYERS];
static int boostFinishedTime;
void initPlayer(void) void initPlayer(void)
{ {
@ -50,6 +51,8 @@ void initPlayer(void)
memset(&availableGuns, 0, sizeof(int) * BT_MAX); memset(&availableGuns, 0, sizeof(int) * BT_MAX);
boostFinishedTime = (game.currentMission->challengeData.isChallenge || game.difficulty == DIFFICULTY_NORMAL) ? (int)BOOST_FINISHED_TIME : (int)(BOOST_FINISHED_TIME * 2);
battle.numPlayerGuns = 0; battle.numPlayerGuns = 0;
player->selectedGunType = -1; player->selectedGunType = -1;
@ -201,7 +204,7 @@ void doPlayer(void)
} }
} }
if (battle.boostTimer == (int)BOOST_FINISHED_TIME) if (battle.boostTimer == boostFinishedTime)
{ {
deactivateBoost(); deactivateBoost();
} }
@ -367,7 +370,7 @@ static void handleMouse(void)
if (isControl(CONTROL_ACCELERATE)) if (isControl(CONTROL_ACCELERATE))
{ {
if (battle.boostTimer > BOOST_FINISHED_TIME || game.currentMission->challengeData.noBoost) if (battle.boostTimer > boostFinishedTime || game.currentMission->challengeData.noBoost)
{ {
applyFighterThrust(); applyFighterThrust();
} }