(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:
parent
7cd66c0f70
commit
828b84d840
5 changed files with 14 additions and 9 deletions
|
@ -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(§, 1, "Mines", sect.sct_mines, current);
|
||||
sect.sct_mines = current;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue