Remove mission_pln_arm()'s argument tech
It always existed, and was never used for anything.
This commit is contained in:
parent
ba710c1c7c
commit
5fda0594e4
1 changed files with 7 additions and 13 deletions
|
@ -70,7 +70,7 @@ static void divide(struct emp_qelem *, struct emp_qelem *, coord, coord);
|
||||||
static int dosupport(struct genlist *, coord, coord, natid, natid);
|
static int dosupport(struct genlist *, coord, coord, natid, natid);
|
||||||
static int find_airport(struct emp_qelem *, coord, coord);
|
static int find_airport(struct emp_qelem *, coord, coord);
|
||||||
static int mission_pln_arm(struct emp_qelem *, coord, coord, int,
|
static int mission_pln_arm(struct emp_qelem *, coord, coord, int,
|
||||||
int, struct ichrstr *, int, int, int *);
|
int, struct ichrstr *, int, int);
|
||||||
static void mission_pln_sel(struct emp_qelem *, int, int, int);
|
static void mission_pln_sel(struct emp_qelem *, int, int, int);
|
||||||
static int perform_mission(coord, coord, natid, struct emp_qelem *, int,
|
static int perform_mission(coord, coord, natid, struct emp_qelem *, int,
|
||||||
char *, int);
|
char *, int);
|
||||||
|
@ -408,7 +408,7 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct mchrstr *mcp;
|
struct mchrstr *mcp;
|
||||||
struct plchrstr *pcp;
|
struct plchrstr *pcp;
|
||||||
int dam = 0, dam2, mission_flags, tech;
|
int dam = 0, dam2, mission_flags;
|
||||||
natid plane_owner = 0;
|
natid plane_owner = 0;
|
||||||
int md, range, air_dam = 0;
|
int md, range, air_dam = 0;
|
||||||
double prb, hitchance, vrange;
|
double prb, hitchance, vrange;
|
||||||
|
@ -644,19 +644,18 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
||||||
/* Split off the escorts at this base into e */
|
/* Split off the escorts at this base into e */
|
||||||
divide(&escorts, &e, air->x, air->y);
|
divide(&escorts, &e, air->x, air->y);
|
||||||
|
|
||||||
tech = 0;
|
|
||||||
mission_flags = 0;
|
mission_flags = 0;
|
||||||
mission_flags |= P_X; /* stealth (shhh) */
|
mission_flags |= P_X; /* stealth (shhh) */
|
||||||
mission_flags |= P_H; /* gets turned off if not all choppers */
|
mission_flags |= P_H; /* gets turned off if not all choppers */
|
||||||
|
|
||||||
mission_flags = mission_pln_arm(&b, air->x, air->y, 2 * md, 'p', 0,
|
mission_flags = mission_pln_arm(&b, air->x, air->y, 2 * md, 'p', 0,
|
||||||
0, mission_flags, &tech);
|
0, mission_flags);
|
||||||
|
|
||||||
if (QEMPTY(&b))
|
if (QEMPTY(&b))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
mission_flags = mission_pln_arm(&e, air->x, air->y, 2 * md, 'p', 0,
|
mission_flags = mission_pln_arm(&e, air->x, air->y, 2 * md, 'p', 0,
|
||||||
P_F | P_ESC, mission_flags, &tech);
|
P_F | P_ESC, mission_flags);
|
||||||
|
|
||||||
pp = BestAirPath(buf, air->x, air->y, x, y);
|
pp = BestAirPath(buf, air->x, air->y, x, y);
|
||||||
if (CANT_HAPPEN(!pp))
|
if (CANT_HAPPEN(!pp))
|
||||||
|
@ -926,14 +925,12 @@ mission_pln_sel(struct emp_qelem *list, int wantflags, int nowantflags,
|
||||||
static int
|
static int
|
||||||
mission_pln_arm(struct emp_qelem *list, coord x, coord y, int dist,
|
mission_pln_arm(struct emp_qelem *list, coord x, coord y, int dist,
|
||||||
int mission, struct ichrstr *ip, int flags,
|
int mission, struct ichrstr *ip, int flags,
|
||||||
int mission_flags, int *tech)
|
int mission_flags)
|
||||||
{
|
{
|
||||||
struct emp_qelem *qp;
|
struct emp_qelem *qp;
|
||||||
struct emp_qelem *next;
|
struct emp_qelem *next;
|
||||||
struct plist *plp;
|
struct plist *plp;
|
||||||
|
|
||||||
if (*tech == 0)
|
|
||||||
*tech = 9999;
|
|
||||||
for (qp = list->q_forw; qp != list; qp = next) {
|
for (qp = list->q_forw; qp != list; qp = next) {
|
||||||
next = qp->q_forw;
|
next = qp->q_forw;
|
||||||
plp = (struct plist *)qp;
|
plp = (struct plist *)qp;
|
||||||
|
@ -954,8 +951,6 @@ mission_pln_arm(struct emp_qelem *list, coord x, coord y, int dist,
|
||||||
if (plp->pcp->pl_flags & P_I)
|
if (plp->pcp->pl_flags & P_I)
|
||||||
mission_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))
|
if (!(plp->pcp->pl_flags & P_H))
|
||||||
/* no stealth on this mission */
|
/* no stealth on this mission */
|
||||||
mission_flags &= ~P_H;
|
mission_flags &= ~P_H;
|
||||||
|
@ -1243,7 +1238,7 @@ air_defense(coord x, coord y, natid victim, struct emp_qelem *bomb_list,
|
||||||
struct emp_qelem *esc_list)
|
struct emp_qelem *esc_list)
|
||||||
{
|
{
|
||||||
int dam = 0, cn;
|
int dam = 0, cn;
|
||||||
int mission_flags, tech, combat = 0, rel, dist, z;
|
int mission_flags, combat = 0, rel, dist, z;
|
||||||
struct emp_qelem *qp, interceptors, airp, i, empty, *next;
|
struct emp_qelem *qp, interceptors, airp, i, empty, *next;
|
||||||
struct plist *plp;
|
struct plist *plp;
|
||||||
struct genlist *glp;
|
struct genlist *glp;
|
||||||
|
@ -1353,7 +1348,6 @@ air_defense(coord x, coord y, natid victim, struct emp_qelem *bomb_list,
|
||||||
/* Split off the interceptors at this base into i */
|
/* Split off the interceptors at this base into i */
|
||||||
divide(&interceptors, &i, air->x, air->y);
|
divide(&interceptors, &i, air->x, air->y);
|
||||||
|
|
||||||
tech = 0;
|
|
||||||
mission_flags = 0;
|
mission_flags = 0;
|
||||||
mission_flags |= P_X; /* stealth (shhh) */
|
mission_flags |= P_X; /* stealth (shhh) */
|
||||||
/* gets turned off if not all choppers */
|
/* gets turned off if not all choppers */
|
||||||
|
@ -1373,7 +1367,7 @@ air_defense(coord x, coord y, natid victim, struct emp_qelem *bomb_list,
|
||||||
}
|
}
|
||||||
mission_flags =
|
mission_flags =
|
||||||
mission_pln_arm(&i, air->x, air->y, 2 * dist, 'r', 0, P_F,
|
mission_pln_arm(&i, air->x, air->y, 2 * dist, 'r', 0, P_F,
|
||||||
mission_flags, &tech);
|
mission_flags);
|
||||||
|
|
||||||
/* Did we run out of interceptors? */
|
/* Did we run out of interceptors? */
|
||||||
if (QEMPTY(&i))
|
if (QEMPTY(&i))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue