retreat: Drop unused parameter @code
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>
This commit is contained in:
parent
16f0a07725
commit
75e9b97ba0
8 changed files with 23 additions and 23 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue