More cleanup

This commit is contained in:
Julie Marchant 2019-06-06 09:46:30 -04:00
parent 3f1febc2fc
commit 94f23dc39e
2 changed files with 9 additions and 6 deletions

View File

@ -79,8 +79,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MAX_HOMING 20
#define MAX_DOUBLE_HOMING (game.difficulty != DIFFICULTY_ORIGINAL ? 15 : 10)
#define MAX_MICRO_HOMING 10
#define RAY_INTERVAL 250
#define RAY_DAMAGE_DELAY 5
#define WARP_SPEED MAX(12, 3 * screen->w / 200)
#define ALIEN_WARP_SPEED MIN(-15, -3 * screen->w / 160)
#define ALIEN_WARP_ACCEL (game.difficulty == DIFFICULTY_ORIGINAL ? -15: -0.5)
#define PIXFONT_LINE_HEIGHT 16
#define PIXFONT_W 8

View File

@ -1070,7 +1070,7 @@ static void game_doAliens()
// specified -15 as the *maximum* instead of the
// *minimum*, which at the time was equivalent to
// ``aliens[i].dx = -15``.
LIMIT_ADD(aliens[i].dx, -0.5, -15, 0);
LIMIT_ADD(aliens[i].dx, ALIEN_WARP_ACCEL, ALIEN_WARP_SPEED, 0);
aliens[i].dy = 0;
aliens[i].thinktime = 999;
aliens[i].face = 0;
@ -1163,11 +1163,11 @@ static void game_doAliens()
{
aliens[i].flags += FL_FIRELASER;
}
// XXX: This ammo check only seems to work for ammo[0],
// not ammo[1], thus necessitating using ammo[0] instead of
// ammo[j]. Should be investigated in the future.
// Note: ammo[0] is required whether the ray is primary
// or secondary because futher below, ammo[0] increases on
// any alien that isn't currently firing a ray.
else if ((aliens[i].weaponType[j] == W_ENERGYRAY) &&
(aliens[i].ammo[0] >= 250))
(aliens[i].ammo[0] >= RAY_INTERVAL))
{
aliens[i].flags += FL_FIRERAY;
audio_playSound(SFX_ENERGYRAY, aliens[i].x, aliens[i].y);
@ -1182,7 +1182,7 @@ static void game_doAliens()
}
else
{
LIMIT_ADD(aliens[i].ammo[0], 1, 0, 250);
LIMIT_ADD(aliens[i].ammo[0], 1, 0, RAY_INTERVAL);
}
if (aliens[i].flags & FL_FIRELASER)