]> git.pond.sub.org Git - empserver/commitdiff
Land units no longer sweep allied landmines
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 11 Jun 2012 15:02:53 +0000 (17:02 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 11 Jun 2012 15:28:14 +0000 (17:28 +0200)
They don't hit them since commit fe372539, v4.3.27.  Sweeping was
forgotten then.

Closes #717591.

src/lib/subs/lndsub.c

index c5774bae29595da2fa392d450183124f47299503..3d26d67e86032aaebcc4bdd204c27c678dbc81a1 100644 (file)
@@ -549,10 +549,10 @@ lnd_sweep(struct emp_qelem *land_list, int verbose, int takemob,
            continue;
        }
        getsect(llp->unit.land.lnd_x, llp->unit.land.lnd_y, &sect);
-       if (sect.sct_oldown == llp->unit.land.lnd_own) {
+       if (relations_with(sect.sct_oldown, actor) == ALLIED) {
            if (verbose)
                mpr(actor,
-                   "%s is in a sector completely owned by you.  Don't bother digging up mines there!\n",
+                   "%s is in a sector completely owned by you or an ally.  Don't bother digging up mines there!\n",
                    prland(&llp->unit.land));
            continue;
        }