retreat: Drop unused parameter @code
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 3 Jan 2021 09:55:55 +0000 (10:55 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jan 2021 07:39:13 +0000 (08:39 +0100)
Unused since commit beedf8dce "retreat: Rewrite automatic retreat code
to fix its many bugs", v4.3.33.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/retreat.h
src/lib/commands/boar.c
src/lib/commands/bomb.c
src/lib/commands/laun.c
src/lib/commands/mfir.c
src/lib/commands/sona.c
src/lib/commands/torp.c
src/lib/subs/retreat.c

index 6587f3b64fb16bc06d10217f745effecdaec81f4..06e7b843f95b1330b491493d825631d7f65dc7b3 100644 (file)
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *     Ken Stevens, 1995
- *     Markus Armbruster, 2014-2015
+ *     Markus Armbruster, 2014-2021
  */
 
 #ifndef RETREAT_H
@@ -49,7 +49,7 @@
 #define RET_DCHRGED    64      /* Retreat when depth-charged */
 #define RET_BOARDED    128     /* Retreat when unsuccessfully boarded */
 
-extern void retreat_ship(struct shpstr *, natid, char);
-extern void retreat_land(struct lndstr *, natid, char);
+extern void retreat_ship(struct shpstr *, natid);
+extern void retreat_land(struct lndstr *, natid);
 
 #endif
index dd00b6513af320743a4825dd57f04ffd811d5a45..7652ad1144d059911f367222f97eb01e8a4350a8 100644 (file)
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *     Ken Stevens, 1995
- *     Markus Armbruster, 2011-2015
+ *     Markus Armbruster, 2011-2021
  */
 
 #include <config.h>
@@ -166,7 +166,7 @@ boar(void)
     if (!(att_fight(A_BOARD, off, &olist, 1.0, def, &dlist, 1.0))) {
        getship(def_uid, &ship);
        if (ship.shp_rflags & RET_BOARDED) {
-           retreat_ship(&ship, def_own, 'u');
+           retreat_ship(&ship, def_own);
            putship(def_uid, &ship);
        }
     }
index 146887e643b19d50eadc5e964730747763198f8d..ba19b392fa70509ce416c0a11d705564f2c7eda7 100644 (file)
@@ -30,7 +30,7 @@
  *     Dave Pare, 1986
  *     Ken Stevens, 1995
  *     Steve McClure, 1998-2000
- *     Markus Armbruster, 2004-2020
+ *     Markus Armbruster, 2004-2021
  */
 
 #include <config.h>
@@ -446,9 +446,9 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
               prship(&ship),
               xyas(target->sct_x, target->sct_y, player->cnum));
        if (dam && (ship.shp_rflags & RET_INJURED))
-           retreat_ship(&ship, ship.shp_own, 'i');
+           retreat_ship(&ship, ship.shp_own);
        else if (ship.shp_rflags & RET_BOMBED)
-           retreat_ship(&ship, ship.shp_own, 'b');
+           retreat_ship(&ship, ship.shp_own);
        putship(ship.shp_uid, &ship);
        collateral_damage(target->sct_x, target->sct_y, dam / 2);
     }
@@ -637,9 +637,9 @@ land_bomb(struct emp_qelem *list, struct sctstr *target)
                xyas(target->sct_x, target->sct_y, own));
        landdamage(&land, dam);
        if (dam && (land.lnd_rflags & RET_INJURED))
-           retreat_land(&land, own, 'i');
+           retreat_land(&land, own);
        else if (land.lnd_rflags & RET_BOMBED)
-           retreat_land(&land, own, 'b');
+           retreat_land(&land, own);
        nreport(player->cnum, N_UNIT_BOMB, own, 1);
        putland(land.lnd_uid, &land);
        collateral_damage(target->sct_x, target->sct_y, dam);
index a5d84eaf47a31e01e3678be2294306e2310d9823..2f4fc8054228fca34270986050cf72f238082ba8 100644 (file)
@@ -30,7 +30,7 @@
  *     Dave Pare, 1986
  *     Ken Stevens, 1995
  *     Steve McClure, 1998-2000
- *     Markus Armbruster, 2005-2018
+ *     Markus Armbruster, 2005-2021
  */
 
 #include <config.h>
@@ -277,7 +277,7 @@ launch_missile(struct plnstr *pp)
        if (target_ship.shp_effic < SHIP_MINEFF)
            pr("%s sunk!\n", prship(&target_ship));
        if (dam && (target_ship.shp_rflags & RET_INJURED))
-           retreat_ship(&target_ship, target_ship.shp_own, 'i');
+           retreat_ship(&target_ship, target_ship.shp_own);
        putship(target_ship.shp_uid, &target_ship);
     }
     return RET_OK;
index 533f13f3146122157dc1b96114bab8e15f08cac4..5fd32011c05c32cbb1d88273974f335be667e073 100644 (file)
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *     Steve McClure, 2000
- *     Markus Armbruster, 2004-2016
+ *     Markus Armbruster, 2004-2021
  */
 
 #include <config.h>
@@ -398,11 +398,11 @@ multifire(void)
            if (vship.shp_effic < SHIP_MINEFF)
                pr("%s sunk!\n", prsub(&vship));
            if (dam && (vship.shp_rflags & RET_INJURED))
-               retreat_ship(&vship, vict, 'i');
+               retreat_ship(&vship, vict);
            else if (target == targ_sub && (vship.shp_rflags & RET_DCHRGED))
-               retreat_ship(&vship, vict, 'd');
+               retreat_ship(&vship, vict);
            else if (totaldefdam == 0 && (vship.shp_rflags & RET_HELPLESS))
-               retreat_ship(&vship, vict, 'h');
+               retreat_ship(&vship, vict);
            putship(vship.shp_uid, &vship);
            break;
        }
index e8c97c1360d316a76f806ab66d7fed68add9b60d..650a24ab4add4e083769272e0d77fcab6b7b9b5f 100644 (file)
@@ -29,7 +29,7 @@
  *  Known contributors to this file:
  *     Jim Griffith, 1989
  *     Ken Stevens, 1995
- *     Markus Armbruster, 2004-2015
+ *     Markus Armbruster, 2004-2021
  */
 
 #include <config.h>
@@ -163,7 +163,7 @@ sona(void)
                       xyas(ship.shp_x, ship.shp_y,
                            targ.shp_own), prship(&targ));
                if (targ.shp_rflags & RET_SONARED)
-                   retreat_ship(&targ, targ.shp_own, 's');
+                   retreat_ship(&targ, targ.shp_own);
            }
            if (dist > vrange)
                continue;
index db4b7b10ca8ad1733633138d174daae82438bac7..fc5d3d4a08df1d5bc5db31446564584646ff9a71 100644 (file)
@@ -31,7 +31,7 @@
  *     Thomas Ruschak, 1992
  *     Ken Stevens, 1995
  *     Steve McClure, 2000
- *     Markus Armbruster, 2004-2015
+ *     Markus Armbruster, 2004-2021
  */
 
 #include <config.h>
@@ -191,7 +191,7 @@ torp(void)
            if (vship.shp_effic < SHIP_MINEFF)
                pr("%s sunk!\n", prsub(&vship));
            if (vship.shp_rflags & RET_TORPED)
-               retreat_ship(&vship, vshipown, 't');
+               retreat_ship(&vship, vshipown);
            putship(vship.shp_uid, &vship);
        } else {
            pr("Missed\n");
index 7f97c09c7d5b496ffb9ac3cc3671af9677bf5248..4767ebb3df35a231c020a7c18a1a760c21025a3e 100644 (file)
@@ -29,7 +29,7 @@
  *  Known contributors to this file:
  *     Steve McClure, 2000
  *     Ron Koenderink, 2005-2006
- *     Markus Armbruster, 2006-2015
+ *     Markus Armbruster, 2006-2021
  */
 
 #include <config.h>
@@ -67,7 +67,7 @@ consume_step(char *rpath, int *rflags)
 }
 
 void
-retreat_ship(struct shpstr *sp, natid own, char code)
+retreat_ship(struct shpstr *sp, natid own)
 {
     int n, i;
     struct emp_qelem list;
@@ -173,7 +173,7 @@ retreat_ships_step(struct emp_qelem *list, char step, natid actor)
 }
 
 void
-retreat_land(struct lndstr *lp, natid own, char code)
+retreat_land(struct lndstr *lp, natid own)
 {
     int n, i;
     struct emp_qelem list;