Fixed a bug that caused mobile shields to resurrect the boss from the dead.

The main problem with this bug was simply that it caused a constant
cycle of resurrection and death, which generated tons and tons of
powerups. It was only realistically achievable with cheats enabled,
but still, this seems undesirable.
This commit is contained in:
Julie Marchant 2019-05-26 19:49:28 -04:00
parent 87253b7212
commit 431358e7ae
1 changed files with 4 additions and 2 deletions

View File

@ -1101,7 +1101,9 @@ static void game_doAliens()
aliens[i].dy = 20 + (cosf(barrierLoop + aliens[i].speed) * 40);
}
if (aliens[i].classDef == CD_MOBILESHIELD)
if ((aliens[i].classDef == CD_MOBILESHIELD) &&
(aliens[ALIEN_BOSS].active) &&
(aliens[ALIEN_BOSS].shield > 0))
{
LIMIT_ADD(aliens[ALIEN_BOSS].shield, 1, 0,
aliens[ALIEN_BOSS].maxShield);
@ -1111,7 +1113,7 @@ static void game_doAliens()
LIMIT_ADD(aliens[i].reload[1], -1, 0, 999);
if ((!(aliens[i].flags & FL_DISABLED)) &&
(!(aliens[i].flags & FL_NOFIRE)))
(!(aliens[i].flags & FL_NOFIRE)))
{
if ((aliens[i].target->shield > 0))
canFire = alien_checkTarget(&aliens[i]);