]> git.pond.sub.org Git - empserver/commitdiff
Fix setsector not to disclose number of landmines to occupier
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 8 Jan 2013 14:52:27 +0000 (15:52 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 12 Jan 2013 16:56:26 +0000 (17:56 +0100)
When the deity sets the number of mines with setsector, the sector
owner (if any) is told the resulting number of mines.  Even for
occupied sectors, where mines belong to the old owner, and thus
shouldn't be disclosed.  Oops.

Fix setsector not to tell the sector owner anything then.

src/lib/commands/setsect.c

index 390c0f463cfc427acb9cdec8dfd692fc34e5a6c4..995fadc7df2000bc1ab1160617ed1aad9455333b 100644 (file)
@@ -158,7 +158,7 @@ setsector(void)
                    current = 0;
                if (current > MINES_MAX)
                    current = MINES_MAX;
-               if (sect.sct_own != 0)
+               if (sect.sct_own != 0 && sect.sct_own == sect.sct_oldown)
                    resnoise(&sect, 1, "Mines", sect.sct_mines, current);
                sect.sct_mines = current;
                break;