Remove take_plane_off_ship(), take_plane_off_land()
Commit 3e370da5
left them pretty trivial. Inline, simplify, remove.
This commit is contained in:
parent
4478df7da6
commit
b024d57b38
3 changed files with 2 additions and 24 deletions
|
@ -556,8 +556,6 @@ extern int pln_arm(struct emp_qelem *, int, char, struct ichrstr *,
|
||||||
extern int pln_mobcost(int, struct plnstr *, int);
|
extern int pln_mobcost(int, struct plnstr *, int);
|
||||||
extern void pln_put(struct emp_qelem *);
|
extern void pln_put(struct emp_qelem *);
|
||||||
extern void pln_put1(struct plist *);
|
extern void pln_put1(struct plist *);
|
||||||
extern void take_plane_off_ship(struct plnstr *, struct shpstr *);
|
|
||||||
extern void take_plane_off_land(struct plnstr *, struct lndstr *);
|
|
||||||
extern void plane_sweep(struct emp_qelem *, coord, coord);
|
extern void plane_sweep(struct emp_qelem *, coord, coord);
|
||||||
extern int put_plane_on_land(struct plnstr *, struct lndstr *);
|
extern int put_plane_on_land(struct plnstr *, struct lndstr *);
|
||||||
extern int pln_hitchance(struct plnstr *, int, int);
|
extern int pln_hitchance(struct plnstr *, int, int);
|
||||||
|
|
|
@ -444,7 +444,7 @@ load_plane_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
|
||||||
pln.pln_mission = 0;
|
pln.pln_mission = 0;
|
||||||
putplane(pln.pln_uid, &pln);
|
putplane(pln.pln_uid, &pln);
|
||||||
} else {
|
} else {
|
||||||
take_plane_off_ship(&pln, sp);
|
pln.pln_ship = -1;
|
||||||
sprintf(buf, "unloaded in your %s at %s",
|
sprintf(buf, "unloaded in your %s at %s",
|
||||||
dchr[sectp->sct_type].d_name,
|
dchr[sectp->sct_type].d_name,
|
||||||
xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
|
xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
|
||||||
|
@ -823,7 +823,7 @@ load_plane_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
|
||||||
gift(lp->lnd_own, player->cnum, &pln, buf);
|
gift(lp->lnd_own, player->cnum, &pln, buf);
|
||||||
putplane(pln.pln_uid, &pln);
|
putplane(pln.pln_uid, &pln);
|
||||||
} else {
|
} else {
|
||||||
take_plane_off_land(&pln, lp);
|
pln.pln_land = -1;
|
||||||
sprintf(buf, "unloaded at your sector at %s",
|
sprintf(buf, "unloaded at your sector at %s",
|
||||||
xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
|
xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
|
||||||
gift(sectp->sct_own, player->cnum, &pln, buf);
|
gift(sectp->sct_own, player->cnum, &pln, buf);
|
||||||
|
|
|
@ -860,16 +860,6 @@ put_plane_on_ship(struct plnstr *plane, struct shpstr *ship)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
take_plane_off_ship(struct plnstr *plane, struct shpstr *ship)
|
|
||||||
{
|
|
||||||
if (CANT_HAPPEN(plane->pln_ship != ship->shp_uid))
|
|
||||||
return;
|
|
||||||
|
|
||||||
plane->pln_ship = -1;
|
|
||||||
putplane(plane->pln_uid, plane);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fit a plane of PP's type on land unit LP.
|
* Fit a plane of PP's type on land unit LP.
|
||||||
* Updating the plane accordingly is the caller's job.
|
* Updating the plane accordingly is the caller's job.
|
||||||
|
@ -900,16 +890,6 @@ put_plane_on_land(struct plnstr *plane, struct lndstr *land)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
take_plane_off_land(struct plnstr *plane, struct lndstr *land)
|
|
||||||
{
|
|
||||||
if (CANT_HAPPEN(plane->pln_land != land->lnd_uid))
|
|
||||||
return;
|
|
||||||
|
|
||||||
plane->pln_land = -1;
|
|
||||||
putplane(plane->pln_uid, plane);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
plane_sweep(struct emp_qelem *plane_list, coord x, coord y)
|
plane_sweep(struct emp_qelem *plane_list, coord x, coord y)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue