From 2bac42ce61633493e1c1d9ff0bcbe76ec9bdd211 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Sat, 28 Feb 2015 15:22:27 -0500 Subject: [PATCH] Don't spawn transports if you can't benefit from bonuses. --- src/aliens.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/aliens.cpp b/src/aliens.cpp index b45cc5b..9ed5423 100644 --- a/src/aliens.cpp +++ b/src/aliens.cpp @@ -243,7 +243,10 @@ bool addAlien() randEnemy = CD_SLAVETRANSPORT; } - if (currentGame.area != MAX_MISSIONS - 1) + if ((currentGame.area != MAX_MISSIONS - 1) && + ((currentGame.maxPlasmaRate > currentGame.minPlasmaRate) || + (currentGame.maxPlasmaOutput > currentGame.minPlasmaOutput) || + (currentGame.maxPlasmaDamage > currentGame.minPlasmaDamage))) { if ((rand() % 6) == 0) randEnemy = CD_TRANSPORTSHIP; @@ -1241,10 +1244,9 @@ void doAliens() moveAndSeparate(theEnemy); if ((currentGame.area != 18) || (theEnemy->shield < 0)) - theEnemy->x += engine.ssx + engine.smx; - else - theEnemy->x += engine.smx; + theEnemy->x += engine.ssx; + theEnemy->x += engine.smx; theEnemy->y += engine.ssy + engine.smy; }