static void
sneak_ashore(struct emp_qelem *olist, struct combat *def)
{
- struct emp_qelem *qp, *next;
+ struct emp_qelem *qp;
struct ulist *llp;
struct lndstr *lp;
int rel;
pr("Trying to sneak on shore...\n");
- for (qp = olist->q_forw; qp != olist; qp = next) {
- next = qp->q_forw;
+ for (qp = olist->q_forw; qp != olist; qp = qp->q_forw) {
llp = (struct ulist *)qp;
lp = &llp->unit.land;
rel = relations_with(def->own, player->cnum);
lp->lnd_x = def->x;
lp->lnd_y = def->y;
lp->lnd_ship = -1;
- putland(lp->lnd_uid, lp);
} else {
pr("%s was spotted", prland(lp));
if (rel <= HOSTILE) {
def->own));
pr(" and was killed in the attempt.\n");
lp->lnd_effic = 0;
- putland(lp->lnd_uid, lp);
- lnd_put_one(llp);
} else {
wu(0, def->own, "%s spy spotted in %s.\n",
cname(player->cnum), xyas(def->x, def->y,
lp->lnd_x = def->x;
lp->lnd_y = def->y;
lp->lnd_ship = -1;
- putland(lp->lnd_uid, lp);
}
}
}
+
+ lnd_put(olist);
}