Land units no longer hit allied mines

This commit is contained in:
Markus Armbruster 2011-02-06 16:28:12 +01:00
parent 67b9135e96
commit fe372539b2

View file

@ -623,10 +623,11 @@ lnd_check_mines(struct emp_qelem *land_list)
next = qp->q_back; next = qp->q_back;
llp = (struct ulist *)qp; llp = (struct ulist *)qp;
getsect(llp->unit.land.lnd_x, llp->unit.land.lnd_y, &sect); getsect(llp->unit.land.lnd_x, llp->unit.land.lnd_y, &sect);
if (sect.sct_oldown == llp->unit.land.lnd_own)
continue;
if (SCT_LANDMINES(&sect) == 0) if (SCT_LANDMINES(&sect) == 0)
continue; continue;
if (relations_with(sect.sct_oldown, llp->unit.land.lnd_own)
== ALLIED)
continue;
if (chance(DMINE_LHITCHANCE(sect.sct_mines) / (1 + 2 * with_eng))) { if (chance(DMINE_LHITCHANCE(sect.sct_mines) / (1 + 2 * with_eng))) {
lnd_hit_mine(&llp->unit.land); lnd_hit_mine(&llp->unit.land);
sect.sct_mines--; sect.sct_mines--;