(MINES_MAX): New.

(doland, mine, landmine, setsector, pln_dropoff): Use it.  With
variables, mining beyond the capacity of variables (65535) was
ignored.  Now the mines saturate at MINES_MAX.
This commit is contained in:
Markus Armbruster 2004-03-04 15:54:46 +00:00
parent 7cd66c0f70
commit 828b84d840
5 changed files with 14 additions and 9 deletions

View file

@ -222,6 +222,8 @@ setsector(void)
current += amt;
if (current < 0)
current = 0;
if (current > MINES_MAX)
current = MINES_MAX;
if (sect.sct_own != 0)
resnoise(&sect, 1, "Mines", sect.sct_mines, current);
sect.sct_mines = current;