Pass only PM_* mission flags to ac_encounter()

Since the previous two commits, ac_encounter() checks its
mission_flags argument only for proper mission flags PM_R and PM_S,
not for plane flags P_A, P_S, P_I.

This makes the code to put plane flags into mission flags useless.
Remove it from bomb(), drop(), fly(), para(), reco(),
perform_mission(), mission_pln_arm(), air_defense(), pln_arm().

Much of that code was useless even before: P_X and P_H since Chainsaw
3 option STEALTHV became mandatory in Empire 2, and P_MINE since
commit cc0c3e4f (v4.3.0) cleaned up mine drops.
This commit is contained in:
Markus Armbruster 2008-09-21 10:25:59 -04:00
parent 4ea1d3acff
commit b624ce30dd
8 changed files with 33 additions and 120 deletions

View file

@ -562,9 +562,9 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
}
}
int
void
pln_arm(struct emp_qelem *list, int dist, char mission, struct ichrstr *ip,
int flags, int mission_flags)
int flags)
{
struct emp_qelem *qp;
struct emp_qelem *next;
@ -582,29 +582,11 @@ pln_arm(struct emp_qelem *list, int dist, char mission, struct ichrstr *ip,
free(qp);
continue;
}
if (flags & (P_S | P_I)) {
if (plp->pcp->pl_flags & P_S)
mission_flags |= P_S;
if (plp->pcp->pl_flags & P_I)
mission_flags |= P_I;
}
if (!(plp->pcp->pl_flags & P_H))
/* no stealth on this mission */
mission_flags &= ~P_H;
if (!(plp->pcp->pl_flags & P_X))
/* no stealth on this mission */
mission_flags &= ~P_X;
if (!(plp->pcp->pl_flags & P_MINE)) {
/* no asw on this mission */
mission_flags &= ~P_MINE;
/* FIXME no effect */
}
pp->pln_flags |= PLN_LAUNCHED;
pp->pln_mobil -= pln_mobcost(dist, pp, flags);
putplane(pp->pln_uid, pp);
pr("%s equipped\n", prplane(pp));
}
return mission_flags;
}
static int