/* Don't do it if being pushed by Nova */
if (game.nenhere != 0 && !novapush) {
newcnd();
- for_local_enemies(m) {
+ for (m = 1; m <= game.nenhere; m++) {
finald = distance(w, game.ks[m]);
game.kavgd[m] = 0.5 * (finald + game.kdist[m]);
}
/* No quadrant change -- compute new avg enemy distances */
game.quad[game.sector.x][game.sector.y] = game.ship;
if (game.nenhere) {
- for_local_enemies(m) {
+ for (m = 1; m <= game.nenhere; m++) {
finald = distance(w, game.ks[m]);
game.kavgd[m] = 0.5 * (finald+game.kdist[m]);
game.kdist[m] = finald;
sortklings();
if (!game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova)
attack(false);
- for_local_enemies(m) game.kavgd[m] = game.kdist[m];
+ for (m = 1; m <= game.nenhere; m++)
+ game.kavgd[m] = game.kdist[m];
}
newcnd();
drawmaps(0);
prout(_("(Manual navigation assumed.)"));
else
prout(_("(Manual movement assumed.)"));
- navmode = automatic;
+ navmode = manual;
break;
}
}
} while
/* Repeat if another snova */
(game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova);
- if (KLINGREM==0)
+ if ((game.state.remkl + game.state.remcom + game.state.nscrem)==0)
finish(FWON); /* Snova killed remaining enemy. */
}
}
else {
ddist = FOREVER;
- for_starbases(m) {
+ for (m = 1; m <= game.state.rembase; m++) {
xdist = QUADSIZE * distance(game.state.baseq[m], game.quadrant);
if (xdist < ddist) {
ddist = xdist;
prout(_("Remainder of ship's complement beam down"));
prout(_("to nearest habitable planet."));
} else if (q->planet != NOPLANET && !damaged(DTRANSP)) {
- prout(_("Remainder of ship's complement beam down"));
- prout(_("to %s."), systnames[q->planet]);
+ prout(_("Remainder of ship's complement beam down to %s."),
+ systnames[q->planet]);
} else {
prout(_("Entire crew of %d left to die in outer space."),
game.state.crew);
for (;;) {
/* position next to base by trial and error */
game.quad[game.sector.x][game.sector.y] = IHDOT;
- for_sectors(l) {
+ for (l = 1; l <= QUADSIZE; l++) {
game.sector.x = 3.0*Rand() - 1.0 + game.base.x;
game.sector.y = 3.0*Rand() - 1.0 + game.base.y;
if (VALID_SECTOR(game.sector.x, game.sector.y) &&