#include "unit.h"
static void lnd_mess(char *, struct ulist *);
-static int lnd_hit_mine(struct lndstr *, struct lchrstr *);
+static int lnd_hit_mine(struct lndstr *);
static int has_helpful_engineer(coord, coord, natid);
double
if (SCT_LANDMINES(§) == 0)
continue;
if (chance(DMINE_LHITCHANCE(sect.sct_mines) / (1 + 2 * with_eng))) {
- lnd_hit_mine(&llp->unit.land, ((struct lchrstr *)llp->chrp));
+ lnd_hit_mine(&llp->unit.land);
sect.sct_mines--;
putsect(§);
putland(llp->unit.land.lnd_uid, &llp->unit.land);
}
static int
-lnd_hit_mine(struct lndstr *lp, struct lchrstr *lcp)
+lnd_hit_mine(struct lndstr *lp)
{
int m;
nreport(lp->lnd_own, N_LHIT_MINE, 0, 1);
m = MINE_LDAMAGE();
- if (lcp->l_flags & L_ENGINEER)
+ if (lchr[lp->lnd_uid].l_flags & L_ENGINEER)
m /= 2;
landdamage(lp, m);