extern int put_plane_on_ship(struct plnstr *, struct shpstr *);
extern void pln_dropoff(struct emp_qelem *, struct ichrstr *,
coord, coord, int);
-extern void pln_mine(struct emp_qelem *list, struct sctstr *sectp);
+extern void pln_mine(struct emp_qelem *, coord, coord);
extern int pln_capable(struct plnstr *, int, int);
extern int pln_airbase_ok(struct plnstr *, int, int);
extern int carrier_planes(struct shpstr *, int);
if (QEMPTY(&bomb_list)) {
pr("No planes got through fighter defenses\n");
} else {
- getsect(tx, ty, &target);
if (wantflags & P_MINE)
- pln_mine(&bomb_list, &target);
+ pln_mine(&bomb_list, tx, ty);
else
pln_dropoff(&bomb_list, ip, tx, ty, -1);
}
}
void
-pln_mine(struct emp_qelem *list, struct sctstr *sectp)
+pln_mine(struct emp_qelem *list, coord tx, coord ty)
{
struct emp_qelem *qp;
struct plist *plp;
int amt;
+ struct sctstr sect;
amt = 0;
for (qp = list->q_forw; qp != list; qp = qp->q_forw) {
}
if (amt > 0) {
- if (sectp->sct_type != SCT_WATER) {
+ getsect(tx, ty, §);
+ if (sect.sct_type != SCT_WATER) {
pr("Your seamines have no effect here.\n");
return;
}
- sectp->sct_mines = MIN(sectp->sct_mines + amt, MINES_MAX);
- pr("%d mines laid in %s.\n", amt,
- xyas(sectp->sct_x, sectp->sct_y, player->cnum));
- if (map_set(player->cnum, sectp->sct_x, sectp->sct_y, 'X', 0))
+ sect.sct_mines = MIN(sect.sct_mines + amt, MINES_MAX);
+ pr("%d mines laid in %s.\n", amt, xyas(tx, ty, player->cnum));
+ if (map_set(player->cnum, tx, ty, 'X', 0))
writemap(player->cnum);
- putsect(sectp);
+ putsect(§);
}
}