planes is used anyway. Clean up other unaccessed variables in the process.
No functional changes.
extern void ac_intercept(struct emp_qelem *, struct emp_qelem *,
struct emp_qelem *, natid, coord, coord);
extern void ac_combat_headers(natid, natid);
-extern void ac_airtoair(struct emp_qelem *, struct emp_qelem *, natid);
+extern void ac_airtoair(struct emp_qelem *, struct emp_qelem *);
extern void ac_doflak(struct emp_qelem *, struct sctstr *);
extern void ac_shipflak(struct emp_qelem *, coord, coord);
extern void ac_landflak(struct emp_qelem *, coord, coord);
struct shiplook head;
struct shiplook *s, *s2;
int changed = 0;
- int intx, inty; /* Last sector planes intercepted over */
int intown = 0; /* Last owner to intercept */
/* We want to only intercept once per sector per owner. So, if we overfly
a sector, and then overfly some land units or ships, we don't want to
continue;
ac_intercept(bomb_list, esc_list, &ilist[sect.sct_own],
sect.sct_own, x, y);
- intx = x;
- inty = y;
intown = sect.sct_own;
}
PR(def_own, "%d fighter%s intercepting %s planes!\n", icount,
icount == 1 ? " is" : "s are", cname(plane_owner));
ac_combat_headers(plane_owner, def_own);
- ac_airtoair(esc_list, &int_list, def_own);
- ac_airtoair(bomb_list, &int_list, def_own);
+ ac_airtoair(esc_list, &int_list);
+ ac_airtoair(bomb_list, &int_list);
PR(plane_owner, "\n");
PR(def_own, "\n");
}
* air-to-air combat.
*/
void
-ac_airtoair(struct emp_qelem *att_list, struct emp_qelem *int_list,
- natid def_own)
+ac_airtoair(struct emp_qelem *att_list, struct emp_qelem *int_list)
{
struct plist *attacker;
struct plist *interceptor;
int more_int;
struct emp_qelem *att_next;
struct emp_qelem *in_next;
- natid att_own;
att = att_list->q_forw;
in = int_list->q_forw;
continue;
}
interceptor = (struct plist *)in;
- att_own = attacker->plane.pln_own;
- def_own = interceptor->plane.pln_own;
nplanes = attacker->plane.pln_effic;
if (nplanes > interceptor->plane.pln_effic)
nplanes = interceptor->plane.pln_effic;
{
struct emp_qelem *qp;
struct genlist *glp;
- struct genitem *gp;
struct mchrstr *mcp;
for (qp = list->q_forw; qp != list; qp = qp->q_forw) {
glp = (struct genlist *)qp;
- gp = (struct genitem *)glp->thing;
if (glp->type != EF_SHIP)
return 0;
struct lndstr *lp;
struct shpstr *sp;
struct sctstr sect;
- struct lchrstr *lcp;
struct mchrstr *mcp;
struct plchrstr *pcp;
int dam = 0, dam2, mission_flags, tech;
if (glp->type == EF_LAND) {
lp = (struct lndstr *)glp->thing;
- lcp = (struct lchrstr *)glp->cp;
if (lp->lnd_effic < LAND_MINFIREEFF)
continue;
mpr(victim, "%s air defense planes intercept!\n",
cname(cn));
ac_combat_headers(victim, cn);
- ac_airtoair(esc_list, &i, air->own);
+ ac_airtoair(esc_list, &i);
combat = 1;
}
/* Now intercept the bombers */
cname(cn));
ac_combat_headers(victim, cn);
}
- ac_airtoair(bomb_list, &i, air->own);
+ ac_airtoair(bomb_list, &i);
PR(cn, "\n");
PR(victim, "\n");
}