extern int lnd_spyval(struct lndstr *);
extern void intelligence_report(int, struct lndstr *, int, char *);
extern void lnd_mar(struct emp_qelem *, double *, double *, int *, natid);
-extern void lnd_put(struct emp_qelem *, natid);
+extern void lnd_mar_put(struct emp_qelem *, natid);
+extern void lnd_put(struct emp_qelem *);
extern int lnd_hardtarget(struct lndstr *);
extern int lnd_mar_one_sector(struct emp_qelem *, int, natid, int);
extern int lnd_support(natid, natid, coord, coord, int);
}
void
-lnd_put(struct emp_qelem *list, natid actor)
+lnd_mar_put(struct emp_qelem *list, natid actor)
{
struct emp_qelem *qp, *next;
struct ulist *llp;
next = qp->q_back;
llp = (struct ulist *)qp;
lp = &llp->unit.land;
- if (actor) {
- mpr(actor, "%s stopped at %s\n",
- prland(lp), xyas(lp->lnd_x, lp->lnd_y, actor));
- if (llp->mobil < -127)
- llp->mobil = -127;
- lp->lnd_mobil = llp->mobil;
- }
+ mpr(actor, "%s stopped at %s\n",
+ prland(lp), xyas(lp->lnd_x, lp->lnd_y, actor));
+ if (llp->mobil < -127)
+ llp->mobil = -127;
+ lp->lnd_mobil = llp->mobil;
putland(lp->lnd_uid, lp);
emp_remque(qp);
free(qp);
}
}
+void
+lnd_put(struct emp_qelem *list)
+{
+ struct emp_qelem *qp, *next;
+ struct ulist *llp;
+
+ for (qp = list->q_back; qp != list; qp = next) {
+ next = qp->q_back;
+ llp = (struct ulist *)qp;
+ putland(llp->unit.land.lnd_uid, &llp->unit.land);
+ emp_remque(qp);
+ free(qp);
+ }
+}
+
/*
* Sweep landmines with engineers in LAND_LIST for ACTOR.
* If EXPLICIT is non-zero, this is for an explicit sweep command from
int oldown;
if (dir <= DIR_STOP || dir >= DIR_VIEW) {
- lnd_put(list, actor);
+ lnd_mar_put(list, actor);
return 1;
}
dx = diroff[dir][0];