Don't permit landmine laying in foreign sectors
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 14 Feb 2009 14:11:26 +0000 (15:11 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 17 Feb 2009 18:28:33 +0000 (19:28 +0100)
src/lib/commands/mine.c

index 3e8601c17a708470e3e45e70410add294f382453..7cdd63b6781307d5456f6a700e1d6e8708086d93 100644 (file)
@@ -123,8 +123,9 @@ landmine(void)
        if (!(shells = land.lnd_item[I_SHELL]))
            continue;
        shells = MIN(shells, land.lnd_mobil);
-       if (!getsect(land.lnd_x, land.lnd_y, &sect) ||
-           sect.sct_type == SCT_WATER || sect.sct_type == SCT_BSPAN) {
+       if (!getsect(land.lnd_x, land.lnd_y, &sect)
+           || sect.sct_type == SCT_WATER || sect.sct_type == SCT_BSPAN
+           || sect.sct_own != land.lnd_own) {
            pr("You can't lay mines there!!\n");
            continue;
        }