(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
|
@ -230,7 +230,7 @@ pln_dropoff(struct emp_qelem *list, struct ichrstr *ip, coord tx, coord ty,
|
|||
sectp = ptr;
|
||||
if (sectp->sct_type == SCT_WATER && ip->i_vtype == V_SHELL) {
|
||||
/* aerial mining */
|
||||
sectp->sct_mines += amt;
|
||||
sectp->sct_mines = min(sectp->sct_mines + amt, MINES_MAX);
|
||||
pr("%d mines laid in %s.\n", amt,
|
||||
xyas(sectp->sct_x, sectp->sct_y, player->cnum));
|
||||
if (amt > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue