From df1ca95a2a501bc59627c4fa748f1658e498bd14 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 27 Sep 2009 10:55:33 -0400 Subject: [PATCH] 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. --- src/lib/commands/para.c | 3 +-- src/lib/subs/mission.c | 2 +- src/lib/subs/plnsub.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/commands/para.c b/src/lib/commands/para.c index a2dee2c5..b32a9de8 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 b63f01af..d5f3e68b 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 0bdf30c2..f03939df 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;