diff --git a/include/plane.h b/include/plane.h index 5c82a501..d9384c32 100644 --- a/include/plane.h +++ b/include/plane.h @@ -172,7 +172,7 @@ extern void ac_planedamage(struct plist *, natid, int, natid, int, 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); diff --git a/src/lib/subs/aircombat.c b/src/lib/subs/aircombat.c index 237e091e..090d8720 100644 --- a/src/lib/subs/aircombat.c +++ b/src/lib/subs/aircombat.c @@ -98,7 +98,6 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list, 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 @@ -256,8 +255,6 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list, continue; ac_intercept(bomb_list, esc_list, &ilist[sect.sct_own], sect.sct_own, x, y); - intx = x; - inty = y; intown = sect.sct_own; } @@ -511,8 +508,8 @@ ac_intercept(struct emp_qelem *bomb_list, struct emp_qelem *esc_list, 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"); } @@ -532,8 +529,7 @@ ac_combat_headers(natid plane_owner, natid def_own) * 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; @@ -544,7 +540,6 @@ ac_airtoair(struct emp_qelem *att_list, struct emp_qelem *int_list, 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; @@ -574,8 +569,6 @@ ac_airtoair(struct emp_qelem *att_list, struct emp_qelem *int_list, 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; diff --git a/src/lib/subs/mission.c b/src/lib/subs/mission.c index 577ddf95..137b6787 100644 --- a/src/lib/subs/mission.c +++ b/src/lib/subs/mission.c @@ -140,12 +140,10 @@ only_subs(struct emp_qelem *list) { 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; @@ -442,7 +440,6 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list, 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; @@ -465,7 +462,6 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list, if (glp->type == EF_LAND) { lp = (struct lndstr *)glp->thing; - lcp = (struct lchrstr *)glp->cp; if (lp->lnd_effic < LAND_MINFIREEFF) continue; @@ -1681,7 +1677,7 @@ air_defense(coord x, coord y, natid victim, struct emp_qelem *bomb_list, 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 */ @@ -1691,7 +1687,7 @@ air_defense(coord x, coord y, natid victim, struct emp_qelem *bomb_list, 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"); }