(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
|
@ -627,8 +627,9 @@ doland(s_char op, int arg, s_char *p, struct sctstr *sect)
|
|||
sect->sct_avail = new;
|
||||
break;
|
||||
case 'M':
|
||||
sect->sct_mines = arg;
|
||||
pr("Mines changed to %d\n", arg);
|
||||
new = errcheck(arg, 0, MINES_MAX);
|
||||
sect->sct_mines = new;
|
||||
pr("Mines changed to %d\n", new);
|
||||
break;
|
||||
case 'L':
|
||||
if (!sarg_xy(p, &newx, &newy))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue