Land units no longer hit allied mines
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Feb 2011 15:28:12 +0000 (16:28 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 18 Feb 2011 17:46:05 +0000 (18:46 +0100)
src/lib/subs/lndsub.c

index fe06901241aa960abbc75267e227f44c46294a62..f15781ed4a25df4e2c879116e9418a564552dec9 100644 (file)
@@ -623,10 +623,11 @@ lnd_check_mines(struct emp_qelem *land_list)
        next = qp->q_back;
        llp = (struct ulist *)qp;
        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)
            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))) {
            lnd_hit_mine(&llp->unit.land);
            sect.sct_mines--;