]> git.pond.sub.org Git - empserver/commitdiff
Clean up outmoded tests for paradrop capability
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 27 Sep 2009 14:55:33 +0000 (10:55 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 8 Dec 2009 07:15:51 +0000 (08:15 +0100)
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
src/lib/subs/mission.c
src/lib/subs/plnsub.c

index a2dee2c5850c11028ec0c16a2c50b986e6937dee..b32a9de84df45874b2e9b575e724d319e8f6a7e2 100644 (file)
@@ -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;
     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)) {
     }
     off->mil = off->troops;
     if (att_abort(A_PARA, off, def)) {
index b63f01af2a594409f70cf5905d25550abd7a9025..d5f3e68b0dd501727a480e3f9cadd6045e8dd52a 100644 (file)
@@ -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 */
        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;
            break;
        itype = I_MILIT;
        needed = load / ichr[I_MILIT].i_lbs;
index 0bdf30c2620c2307f45b2c4283db50875cf30108..f03939df05acc45af8a816a82a28e46f85650ce1 100644 (file)
@@ -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 */
        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;
            break;
        itype = I_MILIT;
        needed = load / ichr[I_MILIT].i_lbs;