Take the address of the queue member instead.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
llp->mobil = 0.0;
putland(llp->unit.land.lnd_uid, &llp->unit.land);
if (llp->unit.land.lnd_own != player->cnum) {
- emp_remque((struct emp_qelem *)llp);
+ emp_remque(&llp->queue);
free(llp);
} else
get_oland(A_ATTACK, llp);
lnd_delete(struct ulist *llp)
{
putland(llp->unit.land.lnd_uid, &llp->unit.land);
- emp_remque((struct emp_qelem *)llp);
+ emp_remque(&llp->queue);
free(llp);
}
if (lp->lnd_own != actor) {
mpr(actor, "%s was disbanded at %s\n",
prland(lp), xyas(lp->lnd_x, lp->lnd_y, actor));
- emp_remque((struct emp_qelem *)llp);
+ emp_remque(&llp->queue);
free(llp);
continue;
}
act[0] = 0;
for (cn = 1; cn < MAXNOC; cn++) {
act[cn] = relations_with(cn, victim) <= HOSTILE;
- emp_initque((struct emp_qelem *)&mi[cn]);
+ emp_initque(&mi[cn].queue);
}
build_mission_list(mi, act, act, x, y, MI_INTERDICT);
other_act[cn] = rel <= HOSTILE;
plane_act[cn] = mission == MI_SINTERDICT
? rel <= NEUTRAL : other_act[cn];
- emp_initque((struct emp_qelem *)&mi[cn]);
+ emp_initque(&mi[cn].queue);
}
build_mission_list(mi, other_act, plane_act, x, y, mission);
act[0] = 0;
for (cn = 1; cn < MAXNOC; cn++) {
act[cn] = feels_like_helping(cn, actee, victim);
- emp_initque((struct emp_qelem *)&mi[cn]);
+ emp_initque(&mi[cn].queue);
}
build_mission_list(mi, act, act, x, y, MI_SUPPORT);
getsect(x, y, §);
a->own = sect.sct_own;
- emp_insque((struct emp_qelem *)a, airp);
+ emp_insque(&a->queue, airp);
}
/*
if (sp->shp_own != actor) {
mpr(actor, "%s was sunk at %s\n",
prship(sp), xyas(sp->shp_x, sp->shp_y, actor));
- emp_remque((struct emp_qelem *)mlp);
+ emp_remque(&mlp->queue);
free(mlp);
continue;
}
xyas(mlp->unit.ship.shp_x, mlp->unit.ship.shp_y, actor));
mlp->unit.ship.shp_mobil = (int)mlp->mobil;
putship(mlp->unit.ship.shp_uid, &mlp->unit.ship);
- emp_remque((struct emp_qelem *)mlp);
+ emp_remque(&mlp->queue);
free(mlp);
}
shipdamage(&mlp->unit.ship, dam);
putship(mlp->unit.ship.shp_uid, &mlp->unit.ship);
if (!mlp->unit.ship.shp_own) {
- emp_remque((struct emp_qelem *)mlp);
+ emp_remque(&mlp->queue);
free(mlp);
}
}