]> git.pond.sub.org Git - empserver/commitdiff
(pln_arm): Callers don't use parameter tech; remove it. Callers
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 30 Aug 2004 16:13:37 +0000 (16:13 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 30 Aug 2004 16:13:37 +0000 (16:13 +0000)
changed.

include/prototypes.h
src/lib/commands/bomb.c
src/lib/commands/drop.c
src/lib/commands/fly.c
src/lib/commands/para.c
src/lib/commands/reco.c
src/lib/subs/plnsub.c

index f0624b553635394c409c4c529a4d1b7164610dc8..cd77f0bbd998e998c0cd22ca34b45e8d8ae5a0cb 100644 (file)
@@ -396,7 +396,7 @@ extern void pln_mine(struct emp_qelem *list, struct sctstr *sectp);
 extern void pln_sel(struct nstr_item *, struct emp_qelem *,
                    struct sctstr *, int, int, int, int);
 extern int pln_arm(struct emp_qelem *, int, int, struct ichrstr *,
 extern void pln_sel(struct nstr_item *, struct emp_qelem *,
                    struct sctstr *, int, int, int, int);
 extern int pln_arm(struct emp_qelem *, int, int, struct ichrstr *,
-                  int, int, int *);
+                  int, int);
 extern int pln_mobcost(int, struct plnstr *, int);
 extern void pln_put(struct emp_qelem *);
 extern void pln_removedupes(struct emp_qelem *, struct emp_qelem *);
 extern int pln_mobcost(int, struct plnstr *, int);
 extern void pln_put(struct emp_qelem *);
 extern void pln_removedupes(struct emp_qelem *, struct emp_qelem *);
index 8e4aa702613b2285aff2f26442dc5e65226a3043..977a5c0eee77977c0152f069b881a4ab0050b601 100644 (file)
@@ -88,7 +88,6 @@ bomb(void)
 {
     s_char *p;
     int mission_flags;
 {
     s_char *p;
     int mission_flags;
-    int tech;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
@@ -154,22 +153,17 @@ bomb(void)
            2, wantflags | P_F | P_ESC, P_M | P_O);
     /*
      * now arm and equip the bombers, transports, whatever.
            2, wantflags | P_F | P_ESC, P_M | P_O);
     /*
      * now arm and equip the bombers, transports, whatever.
-     * tech is stored in high 16 bits of mission_flags.
-     * yuck.
      */
      */
-    tech = 0;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
-    mission_flags =
-       pln_arm(&bomb_list, 2 * ap_to_target, mission, ip, 0,
-               mission_flags, &tech);
+    mission_flags = pln_arm(&bomb_list, 2 * ap_to_target, mission,
+                           ip, 0, mission_flags);
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
-    mission_flags =
-       pln_arm(&esc_list, 2 * ap_to_target, mission, ip, P_F | P_ESC,
-               mission_flags, &tech);
+    mission_flags = pln_arm(&esc_list, 2 * ap_to_target, mission,
+                           ip, P_F | P_ESC, mission_flags);
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
index 7d1cc7606fba6fe208094001a9f239ea0f666602..82c68d7df4181b05954dd53f68261825a23ebd81 100644 (file)
@@ -52,7 +52,6 @@ drop(void)
 {
     s_char *p;
     int mission_flags;
 {
     s_char *p;
     int mission_flags;
-    int tech;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
@@ -130,21 +129,18 @@ drop(void)
            2, P_ESC | P_F, P_M | P_O);
     /*
      * now arm and equip the bombers, transports, whatever.
            2, P_ESC | P_F, P_M | P_O);
     /*
      * now arm and equip the bombers, transports, whatever.
-     * tech is stored in high 16 bits of mission_flags.
-     * yuck.
      */
      */
-    tech = 0;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags |= P_MINE;
     mission_flags = pln_arm(&bomb_list, 2 * ap_to_target, 'd',
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags |= P_MINE;
     mission_flags = pln_arm(&bomb_list, 2 * ap_to_target, 'd',
-                           ip, 0, mission_flags, &tech);
+                           ip, 0, mission_flags);
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
     mission_flags = pln_arm(&esc_list, 2 * ap_to_target, 'd',
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
     mission_flags = pln_arm(&esc_list, 2 * ap_to_target, 'd',
-                           ip, P_ESC | P_F, mission_flags, &tech);
+                           ip, P_ESC | P_F, mission_flags);
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
index 7adc948b86886da13c4a46419c7e1c795cb36ac3..6532ef1944ef327d76ffb56f6bee16409b6a6e03 100644 (file)
@@ -53,7 +53,6 @@ fly(void)
 {
     s_char *p;
     int mission_flags;
 {
     s_char *p;
     int mission_flags;
-    int tech;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
@@ -142,20 +141,17 @@ fly(void)
     }
     /*
      * now arm and equip the bombers, transports, whatever.
     }
     /*
      * now arm and equip the bombers, transports, whatever.
-     * tech is stored in high 16 bits of mission_flags.
-     * yuck.
      */
      */
-    tech = 0;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags = pln_arm(&bomb_list, ap_to_target, 't',
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags = pln_arm(&bomb_list, ap_to_target, 't',
-                           ip, 0, mission_flags, &tech);
+                           ip, 0, mission_flags);
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
     mission_flags = pln_arm(&esc_list, ap_to_target, 't',
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
     mission_flags = pln_arm(&esc_list, ap_to_target, 't',
-                           ip, P_ESC | P_F, mission_flags, &tech);
+                           ip, P_ESC | P_F, mission_flags);
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
index 27f9fa654dd1a976bc1badc21fd9f261439d0d3c..84a2e472990900c4f5d9a68eeb66553c2d1b75b1 100644 (file)
@@ -59,7 +59,6 @@ para(void)
 {
     s_char *p;
     int mission_flags;
 {
     s_char *p;
     int mission_flags;
-    int tech;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
@@ -113,23 +112,18 @@ para(void)
            2, P_ESC | P_F, P_M | P_O);
     /*
      * now arm and equip the bombers, transports, whatever.
            2, P_ESC | P_F, P_M | P_O);
     /*
      * now arm and equip the bombers, transports, whatever.
-     * tech is stored in high 16 bits of mission_flags.
-     * yuck.
      */
      */
-    tech = 0;
     mission_flags = 0;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags = 0;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
-    mission_flags =
-       pln_arm(&bomb_list, 2 * ap_to_target, 'a', &ichr[I_MILIT], 0,
-               mission_flags, &tech);
+    mission_flags = pln_arm(&bomb_list, 2 * ap_to_target, 'a',
+                           &ichr[I_MILIT], 0, mission_flags);
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
-    mission_flags =
-       pln_arm(&esc_list, 2 * ap_to_target, 'a', &ichr[I_MILIT],
-               P_ESC | P_F, mission_flags, &tech);
+    mission_flags = pln_arm(&esc_list, 2 * ap_to_target, 'a',
+                           &ichr[I_MILIT], P_ESC | P_F, mission_flags);
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {
index d9d6b5f7335389fbaca45bc4ba340b9b78a7e508..817cf438aeb196cd4fdc4b74af80809cfe6fcbe8 100644 (file)
@@ -52,7 +52,6 @@ reco(void)
 {
     s_char *p;
     int mission_flags;
 {
     s_char *p;
     int mission_flags;
-    int tech;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
     coord tx, ty;
     coord ax, ay;
     int ap_to_target;
@@ -122,20 +121,17 @@ reco(void)
     /*
      * now arm and equip the bombers, transports, whatever.
      */
     /*
      * now arm and equip the bombers, transports, whatever.
      */
-    tech = 0;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags |= P_A;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
     mission_flags |= P_A;
-    mission_flags =
-       pln_arm(&bomb_list, ap_to_target, 'r', 0, P_S | P_I, mission_flags,
-               &tech);
+    mission_flags = pln_arm(&bomb_list, ap_to_target, 'r',
+                           0, P_S | P_I, mission_flags);
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
-    mission_flags =
-       pln_arm(&esc_list, ap_to_target, 'r', 0, P_F, mission_flags,
-               &tech);
+    mission_flags = pln_arm(&esc_list, ap_to_target, 'r',
+                           0, P_F, mission_flags);
     mission_flags |= PM_R;
 
     if (*player->argp[0] == 's')
     mission_flags |= PM_R;
 
     if (*player->argp[0] == 's')
index 6bfe67261aa21ad8cf1cf742e1d2efcdef702915..80a11918ca968da20a0fd60cd6e8d1151c5089a0 100644 (file)
@@ -518,14 +518,12 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
 
 int
 pln_arm(struct emp_qelem *list, int dist, int mission, struct ichrstr *ip,
 
 int
 pln_arm(struct emp_qelem *list, int dist, int mission, struct ichrstr *ip,
-       int flags, int mission_flags, int *tech)
+       int flags, int mission_flags)
 {
     struct emp_qelem *qp;
     struct emp_qelem *next;
     struct plist *plp;
 
 {
     struct emp_qelem *qp;
     struct emp_qelem *next;
     struct plist *plp;
 
-    if (*tech == 0)
-       *tech = 9999;
     for (qp = list->q_forw; qp != list; qp = next) {
        next = qp->q_forw;
        plp = (struct plist *)qp;
     for (qp = list->q_forw; qp != list; qp = next) {
        next = qp->q_forw;
        plp = (struct plist *)qp;
@@ -540,8 +538,6 @@ pln_arm(struct emp_qelem *list, int dist, int mission, struct ichrstr *ip,
            if (plp->pcp->pl_flags & P_I)
                mission_flags |= P_I;
        }
            if (plp->pcp->pl_flags & P_I)
                mission_flags |= P_I;
        }
-       if (*tech > plp->plane.pln_tech)
-           *tech = plp->plane.pln_tech;
        if (!(plp->pcp->pl_flags & P_H))
            /* no stealth on this mission */
            mission_flags &= ~P_H;
        if (!(plp->pcp->pl_flags & P_H))
            /* no stealth on this mission */
            mission_flags &= ~P_H;