From: Markus Armbruster Date: Sun, 27 Sep 2009 14:55:33 +0000 (-0400) Subject: Clean up outmoded tests for paradrop capability X-Git-Tag: v4.3.23~44 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=df1ca95a2a501bc59627c4fa748f1658e498bd14 Clean up outmoded tests for paradrop capability Initially, paradrop capability was implied both by capability cargo and by capability VTOL. Chainsaw changed para() to require cargo, and added compile-time option PARAFLAG to additionally require new capability para. The optional PARAFLAG rule became mandatory in Empire 2. Chainsaw left the old tests for "cargo or VTOL" in place. Because para() checked "cargo and para" first, the old tests for "cargo or VTOL" always passed, so they had no effect. Clean them up anyway. --- diff --git a/src/lib/commands/para.c b/src/lib/commands/para.c index a2dee2c58..b32a9de84 100644 --- a/src/lib/commands/para.c +++ b/src/lib/commands/para.c @@ -142,8 +142,7 @@ paradrop(struct emp_qelem *list, coord x, coord y) att_combat_init(off, EF_PLANE); for (qp = list->q_forw; qp != list; qp = qp->q_forw) { plp = (struct plist *)qp; - if (plp->pcp->pl_flags & (P_V | P_C)) - off->troops += plp->misc; + off->troops += plp->misc; } off->mil = off->troops; if (att_abort(A_PARA, off, def)) { diff --git a/src/lib/subs/mission.c b/src/lib/subs/mission.c index b63f01af2..d5f3e68b0 100644 --- a/src/lib/subs/mission.c +++ b/src/lib/subs/mission.c @@ -917,7 +917,7 @@ mission_pln_equip(struct plist *plp, struct ichrstr *ip, char mission) needed = (load * 2) / ip->i_lbs; break; case 'a': /* paradrop */ - if ((pcp->pl_flags & (P_V | P_C)) == 0) + if (!(pcp->pl_flags & P_P)) break; itype = I_MILIT; needed = load / ichr[I_MILIT].i_lbs; diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index 0bdf30c26..f03939df0 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -666,7 +666,7 @@ pln_equip(struct plist *plp, struct ichrstr *ip, char mission) needed = (load * 2) / ichr[I_SHELL].i_lbs; break; case 'a': /* paradrop */ - if ((pcp->pl_flags & (P_V | P_C)) == 0) + if (!(pcp->pl_flags & P_P)) break; itype = I_MILIT; needed = load / ichr[I_MILIT].i_lbs;