]> git.pond.sub.org Git - empserver/commitdiff
Revise rules for cargo plane loads
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 27 Sep 2009 22:03:13 +0000 (18:03 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 8 Dec 2009 07:15:51 +0000 (08:15 +0100)
There are three ways to fly cargo: transport (fly command with a
commodity argument), cargo drops (drop command that isn't a sea mine
drop), and paradrops.

A cargo flight can be either an airlift or an airdrop.  Airlifts carry
more cargo than airdrops.  A cargo drop or paradrop with a non-VTOL
plane is an airdrop.  Anything else is an airlift.

Before, paradrop always behaved like an airdrop, regardless of VTOL,
and drop always like an airlift.  This made little sense.

Effect of the change on the stock game: paradrop with tc carries twice
the punch, and np/tr/jt can drop less than they can fly.  In
particular, tr can't drop guns anymore, and jt can drop only one
instead of three.

src/lib/subs/mission.c
src/lib/subs/plnsub.c

index bfa57e823053938f2a89a959f3aeb43c01a0349a..f28ed6fcacfbc6fbb1f8771f50518f876dc12229 100644 (file)
@@ -908,16 +908,24 @@ mission_pln_equip(struct plist *plp, struct ichrstr *ip, char mission)
        itype = I_SHELL;
        break;
     case 't':          /* transport */
        itype = I_SHELL;
        break;
     case 't':          /* transport */
-    case 'd':          /* drop */
        if (!(pcp->pl_flags & P_C) || !ip)
            break;
        itype = ip->i_uid;
        load *= 2;
        break;
        if (!(pcp->pl_flags & P_C) || !ip)
            break;
        itype = ip->i_uid;
        load *= 2;
        break;
+    case 'd':          /* drop */
+       if (!(pcp->pl_flags & P_C) || CANT_HAPPEN(!ip))
+           break;
+       itype = ip->i_uid;
+       if (pcp->pl_flags & P_V)
+           load *= 2;
+       break;
     case 'a':          /* paradrop */
        if (!(pcp->pl_flags & P_P))
            break;
        itype = I_MILIT;
     case 'a':          /* paradrop */
        if (!(pcp->pl_flags & P_P))
            break;
        itype = I_MILIT;
+       if (pcp->pl_flags & P_V)
+           load *= 2;
        break;
     case 'i':          /* missile interception */
        if (load)
        break;
     case 'i':          /* missile interception */
        if (load)
index 293fefeed96d7729b84958fb0b868ee99fe9590a..71e09f37c066d57f24776e9b7448c598dfa643aa 100644 (file)
@@ -658,7 +658,6 @@ pln_equip(struct plist *plp, struct ichrstr *ip, char mission)
        itype = I_SHELL;
        break;
     case 't':          /* transport */
        itype = I_SHELL;
        break;
     case 't':          /* transport */
-    case 'd':          /* drop */
        if (!(pcp->pl_flags & P_C) || !ip)
            break;
        itype = ip->i_uid;
        if (!(pcp->pl_flags & P_C) || !ip)
            break;
        itype = ip->i_uid;
@@ -670,10 +669,19 @@ pln_equip(struct plist *plp, struct ichrstr *ip, char mission)
        itype = I_SHELL;
        load *= 2;
        break;
        itype = I_SHELL;
        load *= 2;
        break;
+    case 'd':          /* drop */
+       if (!(pcp->pl_flags & P_C) || CANT_HAPPEN(!ip))
+           break;
+       itype = ip->i_uid;
+       if (pcp->pl_flags & P_V)
+           load *= 2;
+       break;
     case 'a':          /* paradrop */
        if (!(pcp->pl_flags & P_P))
            break;
        itype = I_MILIT;
     case 'a':          /* paradrop */
        if (!(pcp->pl_flags & P_P))
            break;
        itype = I_MILIT;
+       if (pcp->pl_flags & P_V)
+           load *= 2;
        break;
     case 'r':          /* reconnaissance */
     case 'e':          /* escort */
        break;
     case 'r':          /* reconnaissance */
     case 'e':          /* escort */