setsector: Don't disclose number of landmines to occupier
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. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
290a079b57
commit
c900ef8f1e
4 changed files with 28 additions and 4 deletions
|
@ -145,8 +145,14 @@ setsector(void)
|
|||
current = sect.sct_mines;
|
||||
current += amt;
|
||||
current = LIMIT_TO(current, 0, MINES_MAX);
|
||||
if (sect.sct_own != 0)
|
||||
resnoise(§, "Mines", sect.sct_mines, current);
|
||||
if (sect.sct_own != 0) {
|
||||
if (sect.sct_own == sect.sct_oldown)
|
||||
resnoise(§, "Mines", sect.sct_mines, current);
|
||||
else
|
||||
pr("Mines of %s changed from %d to %d\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum),
|
||||
sect.sct_mines, current);
|
||||
}
|
||||
sect.sct_mines = current;
|
||||
break;
|
||||
case 'o':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue